[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: conditional statement



Hi Maria,

You could try something a little different, like:

if #Empl_Record = 1 AND not instr( 'AQPU', $Status,1)
        do Select-Address
else
        do Fetch-Address
end-if


Cameron

"Cadenas, Maria (MT)" wrote:

> I'm having trouble with the following conditional sentence.  I need a
> statement that would select only employees with an employee record = 1 and a
> status NOT equal to A,Q,P, or U.  It is the OR clause that is giving me
> trouble. Any suggestions?
>
> if #Empl_Record = 1 AND ($Status    <> 'A'
>                          OR $Status <> 'Q'
>                          OR $Status <> 'P'
>                          OR $Status <> 'U')
>         do Select-Address
> else
>         do Fetch-Address
> end-if