Using Parentheses and Other Operators

Changing a WHERE Expression

You can use operators other than the comparison operators to subset your data for querying; you can easily change a WHERE condition that has been previously set.
You can change the WHERE expression in SASUSER.PROFILE.EDU20 from the previous example. In the SQL QUERY TABLES window, select Viewthen selectWhere Conditions for Subset.
Select Operators to display the list of valid operators.
Selecting a logical operator
AND
Select AND from the list.
Select Operators. Select ( from the list. Select Birth date from the Available Columns list. Select OTHER Operators from the list of operators to display a second menu of operators.
Other Operators list
Between
Select Between from the list of other operators.
Select <LOOKUP distinct values> from the Available Columns list.
Lookup Distinct Values dialog box
Select 17OCT1945 from the Lookup Values list. Because the Between operator requires a second value, the Lookup Distinct Values window appears again after you select a value. Select 18DEC1948 from the Lookup Values list.
In the WHERE EXPRESSION window, select Operators. Select )  from the list of operators to complete the expression that will be evaluated first when the query is run.
Complete WHERE expression
Select OK to return to the SQL QUERY COLUMNS window.

Viewing Your Output

Select Toolsthen selectRun Querythen selectRun Immediate to display the output of your query.
Query output
From the SQL QUERY COLUMNS window, select Toolsthen selectReset to reset your query.