We've a procedure that retrieve data quering from picomp2 table.
We want read only valid value - can we do this adding an "and" condition in the query referring to status
and status ='0'
Here is a query that restricts all but good values to be returned.
Select * from piarchive..picomp2 where tag='CDT158' AND status = 0
Please never forget the time constraint e.g. AND time BETWEEN '*-5d' AND '*'
Whoops...that could be a lot of data without the constraints
Retrieving data ...