Subsetting Rows By Using Conditional Operators
Overview
In
the WHERE clause of a PROC SQL query, you can specify any valid SAS
expression to subset or restrict the data that is displayed in output.
The expression might contain any of various types of operators, such
as the following.
Type of Operator
|
Example
|
---|---|
comparison
|
where membertype='GOLD' |
logical
|
where visits<=3 or status='new' |
concatenation
|
where name=trim(last) ||', '||first |
Note: For a complete list of operators
that can be used in SAS expressions, see the SAS documentation.
Using Operators in PROC SQL
Comparison, logical, and concatenation operators are used in PROC SQL as they are used in other SAS procedures. For example, the following WHERE clause contains ...
Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.