WHERE Screening Statements

WHERE phrases perform the same simple selection tests as IF phrases, but also allow for complex criteria and tests to be used directly in TABLE requests without using the DEFINE command.  The basic syntax is: WHERE criteria, with the criteria being any valid Boolean (true or false) expression.  Below are some examples of complex screening statements using WHERE.  Note that alphanumeric and date values must always be enclosed in single quotes when using the WHERE command.

 

 

WHERE (AN:CBID EQ 'R03')  AND  (AN:TIMEBASE EQ 'FT')  AND  (AN:SEX EQ 'F')

 

 

WHERE AC:EFFDATE  EQ  AC:EMPDATE

 

 

WHERE (AC:BASEPAY/173.33) GT 25

 

 

WHERE (TR:TRANCODE EQ 'S42')  OR  (TR:TRANCODE EQ '645' AND TR:SEPCODE EQ 'T')

 

To learn more about WHERE selection tests, refer to your FOCUS documentation.

 

Related Topic:  IF Versus WHERE