DOWNLOAD Procedure
WHERE Statement
Selects observations from SAS data sets.
Restriction: |
The DOWNLOAD procedure processes WHERE statements when
you transfer a single SAS data set.
|
See: |
SAS Statements: Reference .
|
Syntax
WHERE where-expression-1 <logical-operator where-expression-n>;
Required Arguments
- where-expression-1
-
is a WHERE expression.
- logical-operator
-
is one of the following
logical operators:
- where-expression-n
-
is a WHERE expression.
To understand when
using the SUBSTR function causes an index to be used, look at the
format of the SUBSTR function in a WHERE statement:
where substr(variable, position, length)
= 'character-string';
An index is used in
processing when all of the following conditions are met:
-
-
length is less than or equal to the length of
variable
-
length is equal to the length of
character-string
The following example
illustrates using a WHERE statement with the DOWNLOAD procedure. The
downloaded data set contains only the observations that meet the WHERE
condition.
proc download data=revenue out=new;
where origin='Atlanta' and revenue < 10000;
run;
Copyright © SAS Institute Inc. All rights reserved.