04-01-2009 09:38 PM
04-03-2009 12:11 AM
First, we need to make sure if the Lookout Direct database is the NI Citadel 4 database. I'm not sure whether or not Automation Direct changed anything in it. So, let's assume they are the same.
Take a look at this KB.
http://digital.ni.com/public.nsf/allkb/C7D32F9A59D4637086256A7200692F30?OpenDocument
The SQL statements in KB are for the Lookout object. So the use of double quotes (") may be different if you use Access.
What you need to do is to give it a time interval when you query avg or min. And the "DISTINCTROW" may not be supported by Citadel 4.
For example, try the following SQL
SELECT LocalTime, "\\computername\process\Pot", "Avg{\\computername\process\Pot}"
FROM Traces
WHERE Interval = ' 1:00'
AND LocalTime > ' 2001-06-15 09:00:00'
AND LocalTime <= ' 2001-06-15 09:30:00'