Parameters for an "in" statement [message #133905] |
Wed, 22 February 2006 03:00  |
Eclipse User |
|
|
|
Originally posted by: g.roediger.tirol.gv.at
Hi there!
Can you tell me how I can manage it to give more than one value for one
and the same parameter? For example:
ID | Name
--------------
1 | Fritz
2 | Hans
3 | Sepp
Now i want to do this SQL:
'Select Name from MyTable where ID in (2,3)'
So if I know 2 and 3 as constant values, it is no problem. It is also no
problem if there are always two parameters, but what can I do if I don't
know any of these two facts. I want to send the parameter ID (with
possibly more than one value) from my Java-application to BIRT. Can I do
this in any way?
|
|
|
Re: Parameters for an "in" statement [message #134343 is a reply to message #133905] |
Wed, 22 February 2006 11:30  |
Eclipse User |
|
|
|
Hi!
I had the same problem. Plz check the post named 'Query Result' ( 10 feb
06).
bye,
roediGERhard a écrit :
> Hi there!
>
> Can you tell me how I can manage it to give more than one value for one
> and the same parameter? For example:
>
> ID | Name
> --------------
> 1 | Fritz
> 2 | Hans
> 3 | Sepp
>
> Now i want to do this SQL:
>
> 'Select Name from MyTable where ID in (2,3)'
>
> So if I know 2 and 3 as constant values, it is no problem. It is also no
> problem if there are always two parameters, but what can I do if I don't
> know any of these two facts. I want to send the parameter ID (with
> possibly more than one value) from my Java-application to BIRT. Can I do
> this in any way?
>
|
|
|
Re: Parameters for an "in" statement [message #134421 is a reply to message #133905] |
Wed, 22 February 2006 08:57  |
Eclipse User |
|
|
|
Use the Query property binding like:
Open the dataset, enter a query without the in clause.
select the Property Binding tree entry.
Enter something lik "select Name from MyTable where ID in" +
params["inclause"]
Then pass the inclause in as a parameter.
Jason
"roediGERhard" <g.roediger@tirol.gv.at> wrote in message
news:317bfef739bb95d6ce8fad02d269cbbb$1@www.eclipse.org...
> Hi there!
>
> Can you tell me how I can manage it to give more than one value for one
> and the same parameter? For example:
>
> ID | Name
> --------------
> 1 | Fritz
> 2 | Hans
> 3 | Sepp
>
> Now i want to do this SQL:
>
> 'Select Name from MyTable where ID in (2,3)'
>
> So if I know 2 and 3 as constant values, it is no problem. It is also no
> problem if there are always two parameters, but what can I do if I don't
> know any of these two facts. I want to send the parameter ID (with
> possibly more than one value) from my Java-application to BIRT. Can I do
> this in any way?
>
|
|
|
Powered by
FUDForum. Page generated in 0.04082 seconds