Hi,
I desperately need help on the following problem, any advise would be greatly appreciated.
I am using iReports to define a number of reports to be initiated from
Java calls within a web app.
What I need to do is use a dynamic where clause and a dynamic order by clause within a report. I so far have been using syntax such as:
SELECT * FROM TABLE WHERE COLUMN_NAME = $P{parameterName}
and this works a treat. But what I need to do now is something along the lines of:
SELECT * FROM TABLE WHERE ${whereClauseAsParameter} ORDER BY $P{orderByAsParameter}
If I try to do the above then I get an error message :
java.sql.SQLException:�[IBM][CLI�Driver][DB2/NT]�SQL0104N��An�unexpected�token�"END-OF-STATEMENT"�was�found�following�"EARCHRESULTS�WHERE�?".��Expected�tokens�may�include:��"<interval_qualifier>".��SQLSTATE=42601
Can anybody please shed any light on how I might be able to do this ?