Chapter Contents |
Previous |
Next |
SAS/ACCESS Interface to SYSTEM 2000 Data Management Software: Reference |
A SAS BY statement automatically issues an ordering-clause to SYSTEM 2000 software. If a view descriptor already contains an ordering-clause, the BY statement overrides the ordering-clause for that program. An exception is when the SAS procedure includes the NOTSORTED option. Then, the SAS BY statement is ignored, and the view descriptor ordering-clause is used.
Note: When you include a SYSTEM 2000 ordering-clause
in a view descriptor, you can specify a terminator (either a colon or a semicolon).
But if you specify both a where-clause and an ordering-clause, do not use
a terminator between them.
Syntax |
ORDERED BY sortkeys; |
If you specify more than one SYSTEM 2000 component, the values are ordered by the first named component, then the second, and so on. See SYSTEM 2000 QUEST Language for more details on the ordering-clause.
Example |
The following ordering-clause causes the values to be presented in ascending order based on the values in item DEPARTMENT, then within departments in descending order based on the values in item SALARY:
order by department, desc salary
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.