0

ODBC Driver - Auto Piviot Option

Is it possible to add a feature in Canary ODBC driver that automaticly pivots the tag names to columns.

See the SQL PIVOT below.

SELECT * FROM (

SELECT tag_name, time_stamp, value as value FROM openquery(CANARY,

          'select tag_name, time_stamp, value from data

          where tag_name in (''TAG1.Sts.Value'', ''TAG2.Sts.Value'')

          and aggregate_id=''TimeAverage2''

                and aggregate_interval=''01:00:00''')

) c

       PIVOT (

    MAX(value)

    FOR tag_name IN ([TAG1.Sts.Value], [TAG2i.Sts.Value])

) AS P

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
print this pagePrint this page
Vote Follow
  • 1 yr agoLast active
  • 73Views
  • 1 Following