Home » Archived » BIRT » Query with argumentlist ; VALUE in ('A','B','C')
Query with argumentlist ; VALUE in ('A','B','C') [message #255094] |
Tue, 11 September 2007 18:54 |
Klaasjan Tukker Messages: 16 Registered: July 2009 |
Junior Member |
|
|
Hi,
I am looking for a way to bind a "list of values" separated by "," to a
query.
The users enters a list of strings like "A,B,C,D" and the query has to be
expanded to:
SELECT *
FROM myTable
WHERE VALUE in ('A','B','C',D');
How can this be achieved? I tried the regular binding way but that results
in VALUE in ('A,B,C,D')
With kind regards,
Klaasjan
|
|
|
Re: Query with argumentlist ; VALUE in ('A','B','C') [message #255364 is a reply to message #255094] |
Thu, 13 September 2007 19:26 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Klaasjan,
You can do this in the beforeOpen script of the data set.
this.queryText = this.queryText + " Value in ('" + param["one"] + "','"
+ param["two"] + "')";
Jason
Klaasjan Tukker wrote:
> Hi,
>
> I am looking for a way to bind a "list of values" separated by "," to a
> query.
>
> The users enters a list of strings like "A,B,C,D" and the query has to be
> expanded to:
>
> SELECT *
> FROM myTable
> WHERE VALUE in ('A','B','C',D');
>
> How can this be achieved? I tried the regular binding way but that results
> in VALUE in ('A,B,C,D')
>
> With kind regards,
>
> Klaasjan
>
>
|
|
|
Re: Query with argumentlist ; VALUE in ('A','B','C') [message #256396 is a reply to message #255364] |
Wed, 26 September 2007 19:45 |
Eclipse User |
|
|
|
Originally posted by: edk.simsol.com
That looks like it works if you have a parameter for each value. But
how would you do it for one parameter with a list of comma separated
values which may be from 1 to n of values
param=A,B,C,D
Ed
Jason Weathersby wrote:
> Klaasjan,
>
> You can do this in the beforeOpen script of the data set.
>
> this.queryText = this.queryText + " Value in ('" + param["one"] + "','"
> + param["two"] + "')";
>
> Jason
>
> Klaasjan Tukker wrote:
>> Hi,
>>
>> I am looking for a way to bind a "list of values" separated by "," to
>> a query.
>>
>> The users enters a list of strings like "A,B,C,D" and the query has to
>> be expanded to:
>>
>> SELECT *
>> FROM myTable
>> WHERE VALUE in ('A','B','C',D');
>>
>> How can this be achieved? I tried the regular binding way but that
>> results in VALUE in ('A,B,C,D')
>>
>> With kind regards,
>>
>> Klaasjan
>>
|
|
|
Re: Query with argumentlist ; VALUE in ('A','B','C') [message #256528 is a reply to message #256396] |
Fri, 28 September 2007 14:38 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Ed,
You should be able to do this:
this.queryText =this.queryText + " Value in('" + params["onlyone"] + "')";
Jason
Ed wrote:
> That looks like it works if you have a parameter for each value. But
> how would you do it for one parameter with a list of comma separated
> values which may be from 1 to n of values
>
> param=A,B,C,D
>
> Ed
>
> Jason Weathersby wrote:
>> Klaasjan,
>>
>> You can do this in the beforeOpen script of the data set.
>>
>> this.queryText = this.queryText + " Value in ('" + param["one"] +
>> "','" + param["two"] + "')";
>>
>> Jason
>>
>> Klaasjan Tukker wrote:
>>> Hi,
>>>
>>> I am looking for a way to bind a "list of values" separated by "," to
>>> a query.
>>>
>>> The users enters a list of strings like "A,B,C,D" and the query has
>>> to be expanded to:
>>>
>>> SELECT *
>>> FROM myTable
>>> WHERE VALUE in ('A','B','C',D');
>>>
>>> How can this be achieved? I tried the regular binding way but that
>>> results in VALUE in ('A,B,C,D')
>>>
>>> With kind regards,
>>>
>>> Klaasjan
>>>
|
|
|
Goto Forum:
Current Time: Sat Aug 17 21:01:53 GMT 2024
Powered by FUDForum. Page generated in 0.02730 seconds
|