MarkusA

Current value from ...

Discussion created by MarkusA on Dec 15, 2009
Latest reply on Dec 16, 2009 by MarkusA

Hello again,

 

here I have another problem with the PI OLEDB SQL.

 

I need a SQL statement who reads the current value from the piarchive..pisnapshot (and also data from the pipoint..Alarm). The problem is I need only the the current value and with the SELECT string (see below) I get mutiple values with the same tag. Has anyone here a solution for the problem?

string sqlSelect = "SELECT DISTINCT a.tag, a.exdesc, a.descriptor, s.status, s.time 
FROM pipoint..Alarm a, piarchive..pisnapshot s
WHERE a.pointsource = '@' AND s.status <> '0' AND time > '*-2m'"

Greetings,

 

Markus

Outcomes