[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Seeking an SQR 'In' function
On Sun, 10 Oct 1999, Jim Wyant wrote:
> Try,
>
> let #x = instr($Erncd,'REG,OVT,TRV,...',1)
> if #x > 0 ....
>
> Jim
This would work (although you need to switch the first 2 parameters). If
you have a variable storing the qouted, comma seperated values, you could
just say...
If instr($Full_Comma_seperated_list, '''' || $Erncd || '''', 1) > 0
HTH,
> --- "Ivory, Wayne" <wayne.ivory@ILUKA.COM> wrote:
> > SQR 3
> >
> > As you know in SQL you can have a condition such as:
> >
> > WHERE ERNCD IN ('REG','OVT','TRV',...)
> >
> > The other day I was modifying an SQR that had a
> > variable $Erncd that I
> > needed to test for over 20 distinct values. I was
> > unable to find in the
> > manual an SQR equivalent of the above functionality
> > and ended up coding it
> > as:
> >
> > if $Erncd = 'REG' or $Erncd = 'OVT' or
> > $Erncd = 'TRV' or ...
> >
> > What a pain!! Is there a simpler way in SQR?
> >
> > Thanks
> >
> > Wayne Ivory
> > Information Services
> > Iluka Resources Limited
> >
>
>
> =====
>
> __________________________________________________
> Do You Yahoo!?
> Bid and sell for free at http://auctions.yahoo.com
>
-----------------------------------------------------------------------
Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
donm@ontko.com | "In the beginning, there was nothing, which exploded"