I am writing a stored precedure which will retrieve data from a table which is populated by a transaction group. For all the tags in the transaction group, their value is stored every 15 minutes.
The stored procedure will retrieve, for example, the average value for each tag during the period. The result set is to be tagname, average value, tooltip & units (e.g. m3/hr or deg C), with one row per tag.
I have no problem getting the first two values, but is there anywhere I can use SQL to get the Engineering Units and tooltip given the tagname?
I did look in the Console->Advanced section, and the query “SELECT * FROM SQLTAGPROP” seems to give me the data I want, but I don’t see that table anywhere in the SQL Server I’m using.
I suspect the answer may be because I’m using the default Internal Tags provider. Can I query this from SQL? How can I connect to it?
Or should I be using a “Database Driving Provider” and storing my tags there?
If I do this how difficult (or advisable) is it to change over my tags to this from the default provider?