Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Klaasjan Tukker is currently offline Klaasjan TukkerFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>>>
Previous Topic:Language packs and Web Viewer
Next Topic:Null Report Parameter Passed to Data Set
Goto Forum:
  


Current Time: Thu Jul 18 11:31:55 GMT 2024

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

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

Back to the top