Skip to main content



      Home
Home » Archived » BIRT » Query Result
Query Result [message #128577] Fri, 10 February 2006 17:01 Go to next message
Eclipse UserFriend
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 [message #129208 is a reply to message #128577] Mon, 13 February 2006 10:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: twindham.ugaais.com

Yes, I have the exact same problem. Except if I pass " 'ABC', 'XYC' " I get
no results in my result set. How did you get XYZ data to appear in your
result set.

Thanks,
Trace

"chandrika" <cchopra@executivehealthexams.com> wrote in message
news:7c6d39f6a29f828f9cb060655ecfb251$1@www.eclipse.org...
> 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 [message #129411 is a reply to message #129208] Mon, 13 February 2006 14:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cchopra.executivehealthexams.com

If i pass as string and dont give the double quotes( 'ABC', 'XYC'), i get
the XYZ

> Yes, I have the exact same problem. Except if I pass " 'ABC', 'XYC' " I get
> no results in my result set. How did you get XYZ data to appear in your
> result set.
Re: Query Result [message #130802 is a reply to message #129411] Wed, 15 February 2006 14:04 Go to previous messageGo to next message
Eclipse UserFriend
I have exactly same errors :(
Re: Query Result (IN operation bug?) [message #131762 is a reply to message #130802] Thu, 16 February 2006 15:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cchopra.executivehealthexams.com

Any idea when this will be fixed? Anyone filed a bug for this.
I am using the BIRT 2.0

Thanks
Chandrika
Re: Query Result (IN operation bug?) [message #132174 is a reply to message #131762] Fri, 17 February 2006 09:20 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 ;)
Re: Query Result (IN operation bug?) [message #132530 is a reply to message #132404] Sun, 19 February 2006 12:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

> So are you using scripting to compose the query then as per the previous
> posting "How do I use multiple parameters in BITR?"

Not yet. Week was over ;) I'll test this solution as soon as I can. I'll
give feedback when it will be done.

>> When you set ->'123','456'<-, the transmit query is SELECT .. from
>> .... WHERE param IN (''123','456'') instead of IN ('123','456').

Small correction. The passed query is WHERE param IN ('\'123\',\'456\'')
Re: Query Result (IN operation bug?) [message #133962 is a reply to message #132530] Wed, 22 February 2006 04:52 Go to previous message
Eclipse UserFriend
Hi,

So, the solution in previous post is working.

eg.:
var valueText = params["IDparam"];
this.queryText="select * from ... Where .. IN (" +valueText+")";

put this in beforeOpen (script view).
Previous Topic:BIRT logo
Next Topic:Which jar contains PDFRenderOption
Goto Forum:
  


Current Time: Wed Jul 23 16:15:19 EDT 2025

Powered by FUDForum. Page generated in 0.06119 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top