2004 IR Help Posted August 30, 2006 Share Posted August 30, 2006 By: Giretzlehner René giri23 parameter and sql-in-clause of reportquery 2004-02-05 06:10 Hi! I want to use the in-clause of sql in my report-query with one parameter, which contains dynamically one or more values. But the problem is, that this doesn?t work. The report-query: ================= select citybean_.name_ as name, citybean_.postalCode_ as postcode, citybean_.state_ as state, citybean_.country_ as country, citybean_.id_ as id, citybean_.district_ as district from citybean_ where citybean_.district_ in ($P{districtVal}); Is there any possibility to define a parameter that can contain more than one value, which values are even preformatted for the in-clause eg. $P{districtVal} containing string-values looks like: 'value1', 'value2' the resulting in-clause in mysql looks like: where citybean_.district_ in ('value1', 'value2') $P{districtVal} containing int-values looks like: value1, value2 $P{districtVal} containing date-values looks like: '02.12.2003', '05.02.2004' Or is there any other possibility to use a dynamic amount of values, that comes from a parameter, in the in-clause of sql. thanks in advance, Giretzlehner Rene By: Giretzlehner René giri23 RE: parameter and sql-in-clause of reportquery 2004-02-06 02:08 I've solved the problem by myself by using $P!{districtVal} ren銉 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