dpQuery using a $dp

Find and share HowTos to various installations / configurations!
4 posts • Page 1 of 1
AMRPatricio
Posts:61
Joined: Mon Dec 12, 2016 4:43 pm

dpQuery using a $dp

Post by AMRPatricio »

Hi all,
I am trying to use a $dp in one dpQuery. Currently having problems with the syntax.

dpQueryConnectAll("updateStatus",true,"","SELECT '_alert_hdl.._act_state_text' FROM '*.Alarm.unAck.*'WHERE _DP = \\"clifton_50\\" ");

Instead of Clifton_50 I want a $dp.

Any help?

Thanks.
Antonio

nmnogueira
Posts:125
Joined: Thu May 05, 2011 12:59 pm

Re: dpQuery using a $dp

Post by nmnogueira »

try

Code: Select all

 dpQueryConnectAll("updateStatus",true,"","SELECT '_alert_hdl.._act_state_text' FROM '*.Alarm.unAck.*' WHERE _DP = \\""+$dp+"\\" ");

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: dpQuery using a $dp

Post by leoknipp »

Instead of defining the datapoint in the WHERE condition you should use it in the FROM statement.
... FROM '" + $dp + ".Alarm.unAck.*' ...

Best Regards
Leopold Knipp
Senior Support Specialist

AMRPatricio
Posts:61
Joined: Mon Dec 12, 2016 4:43 pm

Re: dpQuery using a $dp

Post by AMRPatricio »

Thank you both.

Best regards,
Antonio

4 posts • Page 1 of 1