2001 JI Open Discussion Posted August 21, 2006 Share Posted August 21, 2006 By: syncat - syncat How to set/change query dinamicaly? 2005-02-04 01:27a simple query: SELECT person_id, person_name FROM Person ORDER BY person_name I want to pass there some couple of id from app so the query should look like SELECT person_id, person_name FROM Person WHERE person_id=12 OR person_id=3 ORDER BY person_name By: Goh S H - shgoh RE: How to set/change query dinamicaly? 2005-02-04 03:44Read this: http://jasperreports.sourceforge.net/tutorial/index.html """ 2. Sometimes is useful to use parameters to dynamically modify portions of the SQL query or to pass the entire SQL query as a parameter to the report filling routines. In such a case, the syntax differs a little, like in the following example: SELECT * FROM Orders ORDER BY $P!{OrderByClause} """ By: syncat - syncat RE: How to set/change query dinamicaly? 2005-02-07 08:04And if I do not know how much times it should appear? One time i will need WHERE person_id=12 OR person_id=3 and the other WHERE person_id=12 OR person_id=3 OR person_id=74 OR person_id=9 ... How can I do that? By: syncat - syncat [sOLVED] 2005-02-07 08:44Oh, i get right now it. Thanks for your previous post :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now