This example shows how to specify the complex selection statements when you select records using the Open Query File (OPNQRYF) command.
QRYSLT('DATE *EQ "880101" *AND AMT *GT 5000.00') QRYSLT('DATE *EQ "880101" *OR AMT *GT 5000.00')
QRYSLT('CODE *EQ "A" *AND TYPE *EQ "X" *OR CODE *EQ "B")
The Code field = "A" and The Type field = "X"
or
The Code field = "B"
QRYSLT('(CODE *EQ "A" *OR CODE *EQ "B") *AND TYPE *EQ "X" + *OR CODE *EQ "C"')
The Code field = "A" and The Type field= "X"
or
The Code field = "B" and The Type field = "X"
or
The Code field = "C"
QRYSLT('CODE = "A" & TYPE = "X" | AMT > 5000.00')
The Code field = "A" and The Type field = "X"
or
The Amt field > 5000.00
QRYSLT('CUSNBR = %RANGE("60000" "69999") & TYPE = "B" + & SALES>0 & ACCRCV / SALES>.3')
The Cusnbr field is in the range 60000-69999 and
The Type field = "B" and
The Sales fields are greater than 0 and
Accrcv divided by Sales is greater than 30 percent