I have a parameter which is a string of one value or comma seperated value. This should be appended to the SQL before execution to display the report.
Ex: if the param = 'Iowa'
My SQL will be
select id,name, population from table a where a.city = 'Iowa' and name like 'A*' order by id
if the param = 'Iowa,Texas'
My SQL will be
select id,name, population from table a where (a.city = 'Iowa' or a.city = 'Texas') and name like 'A*' order by id
How do i solve this issue.
I was trying to create a formula and use the formula in the command prompt to create the SQL. But I guess the SQL gets executed first before the formula gets calculated. So it failed. Any Suggestions.
Thanks,
Kiran