Change the SQL query
Posted: Fri Jul 15, 2011 5:24 pm
Hi I see that parameters can be specified for the SQL query, example:
stiReport["@countryID"] = "UK";
In this case, the designer has a Parameter called "@countryID" and the data source's query text is "select * from customers where country=@countryID".
What I want to do is to be able to change the whole where clause, not just one item. I want the query text to be "select * from customers @where" and then be able to change the code to say stiReport["@where"] = "where country = 'UK'". Is this possible? What's the best way to accomplish this?
stiReport["@countryID"] = "UK";
In this case, the designer has a Parameter called "@countryID" and the data source's query text is "select * from customers where country=@countryID".
What I want to do is to be able to change the whole where clause, not just one item. I want the query text to be "select * from customers @where" and then be able to change the code to say stiReport["@where"] = "where country = 'UK'". Is this possible? What's the best way to accomplish this?