Chapter 12: WHERE-Expression Processing


Definition of WHERE-Expression Processing

WHERE-expression processing

  • enables you to conditionally select a subset of observations, so that SAS processes only the observations that meet a set of specified conditions. For example, if you have a SAS data set containing sales records, you may want to print just the subset of observations for which the sales are greater than $300,000 but less than $600,000. In addition, WHERE-expression processing may improve efficiency of a request. For example, if a WHERE expression can be optimized with an index, it is not necessary for SAS to read all observations in the data set in order to perform the request.

WHERE expression

  • defines a condition that selected observations must satisfy in order to be processed . You can have a single WHERE expression, referred to as a simple expression , such as the following:

     where sales gt 600000; 
  • Or you can have multiple WHERE expressions, referred to as a compound expression , such as the following:

     where sales gt 600000 and salary lt 100000; 



SAS 9.1 Language Reference. Concepts
SAS 9.1 Language Reference Concepts
ISBN: 1590471989
EAN: 2147483647
Year: 2004
Pages: 255

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