Using Parentheses and Other Operators


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.

Changing a WHERE Expression

You can change the WHERE expression in SASUSER.PROFILE.EDU20 from the previous example. In the SQL QUERY TABLES window, select
View Where Conditions for Subset

Select Operators to display the list of valid operators.

click to expand

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.

click to expand

Between

Select Between from the list of other operators.

Select <LOOKUP distinct values> from the Available Columns list.

click to expand

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.

click to expand

Select OK to return to the SQL QUERY COLUMNS window.

Viewing Your Output

Select
Tools Run Query Run Immediate
to display the output of your query.

click to expand

From the SQL QUERY COLUMNS window, select
Tools Reset
to reset your query.




SAS 9.1 SQL Query Window. Users Guide
SAS 9.1 SQL Query Window: Users Guide
ISBN: 1590472098
EAN: 2147483647
Year: 2004
Pages: 54
Authors: SAS Institute

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net