You use the SUBSET statement to specify selection criteria when you create a
view descriptor. This statement is optional. If you omit it, the
view retrieves all the data (that is, all the rows) in the
DBMS table.
The selection-criteria
argument can be either a WHERE clause or a SORT clause. For more
information about the WHERE clause, see
WHERE Clause in a View Descriptor. For more information about the SORT
clause, see
SORT Clause in a View Descriptor. You can use either SAS
column names or DBMS column names in your selection criteria. Specify your WHERE clause
and SORT clause
by using the same or separate SUBSET statements. For example, you can submit the
following SUBSET statements:
subset where jobcode = 1204;
subset sort lastname;
subset where jobcode=1204 sort lastname;
SAS does not check the SUBSET statement for errors. The statement is verified and
validated only when the view descriptor is used in a SAS program.
To delete the selection
criteria, submit a SUBSET statement without any arguments.