Ahulane Posted May 11, 2007 Share Posted May 11, 2007 Hi, I have a problem. I want to pass a Parameter in clause FROM. But there is a probleme during the execution. ... FROM $P{PARAM_1} ... My parameter is type of String (exemple value : param), so when i execute the program, it make automatically quotes like this : ... FROM 'param' ... So it make a SQL error. How can i do for not automatically make quote during the execution ? Link to comment Share on other sites More sharing options...
Ahulane Posted May 11, 2007 Author Share Posted May 11, 2007 I think i've find the solution. ... FROM $P!{PARAM_1} ... (the "!") Can you confirm me it is the correct option, that put "!" always remove quotes ? Thanks Link to comment Share on other sites More sharing options...
mjb Posted May 16, 2007 Share Posted May 16, 2007 When you want to use any parameter in SQL you will need to use $P!{myParam}. This tells jasper to explicitly insert the value of the parameter into the SQL string. If you wanted to pass a parameter and use it in your where clause then you would need to put the $P!{myPARAM} insides quotes. 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