I'm trying to use ssrs to create some report.
MSSQL: 2008 r2 standard
It works fine when not using parameter. Once I used parameter in the sql, it raise syntax fault.
How can I use parameter in the sql to query from pi system?
PI OLEDB and PI OLEDB Enterprise do not know about @Parameters and it looks like the parameter values were not fed before the query was passed to PI OLEDB for parsing. You can use parameters in the query with the "?" placeholder.
Thank you Daphne.
I have tried to use "?" as parameter but another problem raised.
It seems "?" can only work behind "where", if I use ? like this: SELECT TOP ? TIME, TAG FROM PICOMP2 WHERE TAG LIKE 'sinusoid'
It raised fault "syntax error near '?'. (PIOLED)". How to use parameter in SELECT ?
I don't think the TOP ? syntax is supported. Can you limit the number of rows returned by using the "TOP N" filter in SSRS instead? e.g.
Thank you Daphne. It really help!
Retrieving data ...