[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



Try,

let #x = instr($Erncd,'REG,OVT,TRV,...',1)
if #x > 0 ....

Jim

--- "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