SQL Query to extract out the description along with value

Discussion about recent product features & solutions!
Search

Post Reply
4 posts • Page 1 of 1
udit.soota
Posts: 1
Joined: Wed Aug 14, 2019 9:44 am

SQL Query to extract out the description along with value

Post by udit.soota »

Hi,

I'm using a http server to query values from para and was wondering if there was a way to query datapoint descriptions.

I have tried the following query, but it gives out an error.

Query: SELECT '_online.._value' FROM 'XYZ.state.zyx:_common'

Thanks in advance for your help.

User avatar
leoknipp
Posts: 2846
Joined: Tue Aug 24, 2010 7:28 pm

Re: SQL Query to extract out the description along with value

Post by leoknipp »

The _common config is a "virtual" config. In the PARA module it is displayed as a config but it cannot be accessed like a "real" config. As the information is not stored on a config + attribute you cannot use it in a dpQuery(). With the keyword _COMMENT for the WHERE condition you can filter for a DP description.
If you want to read the description for a DP element you have to use the function dpGetDescription().

Best Regards
Leopold Knipp
Senior Support Specialist

buec
Posts: 27
Joined: Tue Dec 07, 2010 3:09 pm

Re: SQL Query to extract out the description along with value

Post by buec »

Also dpGetAllComments() coud be useful, if you have to filter comments.

gschijndel
Posts: 330
Joined: Tue Jan 15, 2019 3:12 pm

Re: SQL Query to extract out the description along with value

Post by gschijndel »

I would not advise a deprecated function, but use the replacement: dpGetAllDescriptions

Post Reply
4 posts • Page 1 of 1