[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
- Subject: Re: Seeking an SQR 'In' function
- From: Jim Wyant <kopy_katt@YAHOO.COM>
- Date: Sun, 10 Oct 1999 21:26:14 -0700
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