I am trying to configure my PI tag to be able to read data from an sql database.
the query works well and I just want to fecth the latest Cd_mean value. how can I configure my PI tag to store that value in a PI tag
I am trying to configure my PI tag to be able to read data from an sql database.
the query works well and I just want to fecth the latest Cd_mean value. how can I configure my PI tag to store that value in a PI tag
another option may be to change your SQL query to return a single row with the largest timestamp?
If you are only going to process that one anyway, it could be better for the network and other resources not to return a bunch of unuseful rows
sahilp I like this approach. I'm thinking that there will be 2 queries. 1 query to get results for distribution and 1 query to get the latest timestamp. The query to get the data will use the largest timestamp in the where clause to fetch the latest data. Is this possible to do this all in one query and then update the latest timestamp accordingly after?
sahilp I like this approach. I'm thinking that there will be 2 queries. 1 query to get results for distribution and 1 query to get the latest timestamp. The query to get the data will use the largest timestamp in the where clause to fetch the latest data. Is this possible to do this all in one query and then update the latest timestamp accordingly after?