Jump to content

IN CLAUSE IN QUERY DOESN'T WORK USING PARAMETER


aperez_6

Recommended Posts

Hi,

I have a problem with a parameter String ( I usually pass values such as: "1234,8756,4212" ), and I use this parameter in the main dataset query:

select *  from table  where field1 in ( $P!{p_param} )

The before statement works when I pass the p_param with values. But when the p_param hasn't values doesn't work the jasper report.

How could I put the solution?

 

Thanks in advanced.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks Hozawa,

I had tried this specificacion but this didn't work too. I think that the problem is with the type definition of the parameter and I don't find manner to use correctly.

Because the parameter is a String and it contains X values that I have to use in the query such as collection of numeric values. 

If I use the $X{IN, field1, p_param} the error in the dataset is: 

Caused by: java.sql.SQLException: Token SQL92 not supported in position: 556

Also I've tried:

             $X{IN,  TO_CHAR(field1), p_param}

But it was a big error hehe.

If someone has encountered the problem, I would appreciate getting the solution!

Thanks,

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...