SQL Statment with OpenQuery()
I have a sql statment:
select * from openquery(insql, 'select datetime,[Level_001.PV],[Level_002.PV] from widehistory where datetime >= "2016-12-14" and datetime <= "2016-12-16"')
it works.
but while I changed it to:
select * from openquery(insql, 'select datetime,' || [[TagNames]] || ' from widehistory where datetime >= "2016-12-14" and datetime <= "2016-12-16"')
it doesn't work, the result show me: Incorrect syntax near '|'.
what shall I do in this case
By the way, is there any sql script and java script examples?

