|
Chapter Contents |
Previous |
Next |
| Language Reference |
var {time1 time5 time9}; /* a literal giving the variables */
var time; /* a matrix containing the names */
var('time1':'time9'); /* an expression */
var _all_; /* a keyword */
The WHERE clause conditionally selects
observations, within the range specification,
according to conditions given in the clause.
The general form of the WHERE clause is
| ^= ^? < <= > >= |
For the following operators, the WHERE clause succeeds if any of the elements in the matrix satisfy the condition:
| = ? =: =* |
Logical expressions can be specified within the WHERE clause using the AND (&) and OR (|) operators. The general form is
| clause&clause | (for an AND clause) | |
| clause|clause | (for an OR clause) |
where clause can be a comparison, a parenthesized clause, or a logical expression clause that is evaluated using operator precedence.
Note: The expression on the left-hand side refers to values of the data set variables, and the expression on the right-hand side refers to matrix values.
The VAR and WHERE clauses are optional, and you can specify them in any order. If a data set is already open, all the options that the data set was first opened with are still in effect. To override any old options, the new USE statement must explicitly specify the new options. Examples of valid statements follow:
use class;
use class var{name sex age};
use class var{name sex age} where(age>10);
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.