Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Another seemingly simple one: 'IN' operator and retrieval arguments

3 posts in Objects Last posting was on 2003-01-02 20:03:05.0Z
Henry Posted on 2003-01-02 17:16:05.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Henry
Date: Thu, 2 Jan 2003 12:16:05 -0500
Subject: Another seemingly simple one: 'IN' operator and retrieval arguments
Lines: 23
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_CAABEE3CDFFF8C5F005EDB2E85256CA2.005EDB7085256CA2@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:658
Article PK: 713228

Here is another problem that seems to be straightforward but for some
reason eludes me.

I have constructed a query in a datawindow using an 'IN' operator. The
'IN' selection criteria are being passed in via retrieval argument. This
is a comparison on a text field so the retrieval argument is a string type.


For some reason, the query is resulting in 0 rows when I pass in multiple
selection criteria in that one string and is returning multiple rows when I
pass in just one criteria.

For example,

the query:
SELECT *
FROM State
WHERE abbreviated_state IN (:retrieval_argument)

When the string variable that becomes :retrieval_argument is "'CA'" the
query returns rows. when the string is "'CA', 'AK'" the query returns
nothing.

Does anyone out there know how Powerbuilder handles string-type retrieval
arguments?


John Evenosky <jevenosky Posted on 2003-01-02 17:01:29.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: John Evenosky <jevenosky@__#$ colburn no__*spam.com>
Subject: Re: Another seemingly simple one: 'IN' operator and retrieval arguments
Date: Thu, 2 Jan 2003 12:01:29 -0500
Organization: USI Colburn Insurance Services
X-Newsreader: MicroPlanet Gravity v2.50
Lines: 27
NNTP-Posting-Host: 12.104.97.195
Message-ID: <364_MPG.187e3a711fab4fdc9896eb@forums.sybase.com>
References: <364_CAABEE3CDFFF8C5F005EDB2E85256CA2.005EDB7085256CA2@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:657
Article PK: 713230

Use a 'String Array' as the retrieval argument.

In article <CAABEE3CDFFF8C5F005EDB2E85256CA2.005EDB7085256CA2
@webforums>, Henry says...

> Here is another problem that seems to be straightforward but for some
> reason eludes me.
>
> I have constructed a query in a datawindow using an 'IN' operator. The
> 'IN' selection criteria are being passed in via retrieval argument. This
> is a comparison on a text field so the retrieval argument is a string type.
>
>
> For some reason, the query is resulting in 0 rows when I pass in multiple
> selection criteria in that one string and is returning multiple rows when I
> pass in just one criteria.
>
> For example,
>
> the query:
> SELECT *
> FROM State
> WHERE abbreviated_state IN (:retrieval_argument)
>
> When the string variable that becomes :retrieval_argument is "'CA'" the
> query returns rows. when the string is "'CA', 'AK'" the query returns
> nothing.
>
> Does anyone out there know how Powerbuilder handles string-type retrieval
> arguments?
>


Henry Posted on 2003-01-02 20:03:05.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Henry
Date: Thu, 2 Jan 2003 15:03:05 -0500
Subject: Re: Another seemingly simple one: 'IN' operator and retrieval arguments
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_F17D95E17167361D006E253285256CA2.0062FB2E85256CA2@webforums>
References: <364_CAABEE3CDFFF8C5F005EDB2E85256CA2.005EDB7085256CA2@webforums> <364_MPG.187e3a711fab4fdc9896eb@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:656
Article PK: 713225

after some bending and tearing this method worked. thanks.