Goodtech

How to query PI SQL with millisecond resolution?

Discussion created by Goodtech on Oct 11, 2011
Latest reply on Oct 11, 2011 by aabrodsky

I’am developing a .NET application querying the PI database by use of OleDB. I like to create queries with milliseconds resolution. I tried the following:

 

SELECT tag, time, value, status, DIGSTRING(status) statusText 
FROM piarchive..picomp2 
WHERE tag = '18DYP1071A' AND time > DATE('10.09.2011 13:30:02.6811817')
ORDER BY time ASC

 

 

This failed, no data was returned.

 

The same query without the millisecond part returned successfully the records:

 

SELECT tag, time, value, status, DIGSTRING(status) statusText 
FROM piarchive..picomp2 
WHERE tag = '18DYP1071A' AND time > DATE('10.09.2011 13:30:02’) 
ORDER BY time ASC

 

How can I query with the millisecond resolution?

 

 

Outcomes