ktrinad Posted August 20, 2006 Share Posted August 20, 2006 By: Paul Stanton - wanto variable in query 2004-04-26 15:48i would like to use a variable in my query which is based on a parameter. jasper does not seem to evaluate the variable, instead sends the variable name '$V{XX}' down to the db engine. is this standard behaviour? if so, it's a little limiting. any one come across this before or had variables work in their queries? By: Richard Laplante - rlaplante RE: variable in query 2004-12-02 12:44Hi, I think a came across a similar problem and I searched a lot before finding the solution which was quite simple. It works for parameter, it might work for Variable. you have to use "!" after your parameter/variable marker. example:SELECT id, name FROM table WHERE id = $P!{itemid} or SELECT id, name FROM adservingactivity WHERE id = $V!{activityid} Hope that will work (I don't have time now to test myself) 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