Query Result [message #128577] |
Fri, 10 February 2006 17:01  |
Eclipse User |
|
|
|
Originally posted by: cchopra.executivehealthexams.com
select id from client where client.name IN (?)
and for the parameter i pass,
'ABC', 'XYZ' as string
The above query returns id for only XYZ, where as the expected results
should be id for both ABC and XYZ
Anyone come across this one?
Thanks
Chandrika
|
|
|
|
|
|
|
Re: Query Result (IN operation bug?) [message #132174 is a reply to message #131762] |
Fri, 17 February 2006 09:20   |
Eclipse User |
|
|
|
chandrika a écrit :
> Any idea when this will be fixed? Anyone filed a bug for this.
> I am using the BIRT 2.0
>
> Thanks
> Chandrika
>
Have a look on "How do I use multiple parameters in BITR?" (15/06/2005)
in this newsgroup.
It seems to be an JDBC problem.
BIRT uses preparedStatemens (please correct me if i'm wrong) and
preparedstatements escape parameters.
When you set ->'123','456'<-, the transmit query is SELECT .. from ....
WHERE param IN ('\'123\',\'456\'') instead of IN ('123','456').
With ->123,456<- , the query is IN ('123,456'). In my case, the colum is
numeric (integer) and the value seems be cast in numeric value 123.456,
then in integer 123. So I have only one line in result.
I hope be clear ;)
|
|
|
Re: Query Result (IN operation bug?) [message #132404 is a reply to message #132174] |
Fri, 17 February 2006 13:05   |
Eclipse User |
|
|
|
Originally posted by: cchopra.executivehealthexams.com
Hi Guillaume
Thanks for the detailed explanation.
So are you using scripting to compose the query then as per the previous
posting "How do I use multiple parameters in BITR?"
thanks
chandrika
Guillaume Hiron wrote:
> chandrika a écrit :
>> Any idea when this will be fixed? Anyone filed a bug for this.
>> I am using the BIRT 2.0
>>
>> Thanks
>> Chandrika
>>
> Have a look on "How do I use multiple parameters in BITR?" (15/06/2005)
> in this newsgroup.
> It seems to be an JDBC problem.
> BIRT uses preparedStatemens (please correct me if i'm wrong) and
> preparedstatements escape parameters.
> When you set ->'123','456'<-, the transmit query is SELECT .. from ....
> WHERE param IN (''123','456'') instead of IN ('123','456').
> With ->123,456<- , the query is IN ('123,456'). In my case, the colum is
> numeric (integer) and the value seems be cast in numeric value 123.456,
> then in integer 123. So I have only one line in result.
> I hope be clear ;)
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06119 seconds