gradstu1 Posted November 25, 2019 Share Posted November 25, 2019 I currently have thisselect * from admwhere (adm.id IN $P!{ID} or $P{ID}='ALL')[/code]adm.id IN $P!{ID} or $P{ID}='ALL' work great if I delete one of them, but with both I get an error. I need my report to allow users to enter more than one ID or enter no IDs (defaulting to all) and have them all show up Link to comment Share on other sites More sharing options...
trvpseudo Posted November 26, 2019 Share Posted November 26, 2019 hi gradstu1 !i think u dont use "OR" in "IN" unless theres subquery inside "IN".ckeck https://www.w3schools.com/sql/sql_in.asp :Dperhaps u need to write "... WHERE adm.id IN($P{ID}, 'ALL') ...", it will return ID which user input & 'ALL'.but that will only work for 1 parameter, idk if case "$P{ID}" contains multiple value separated by comma "," could be read by the query as well.hth + regardsC-TVlol 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