Chapter Contents

Previous

Next
SUBSET

SUBSET



Adds or modifies selection criteria for a view descriptor.

Optional statement
Applies to: view descriptor


Syntax
Details

Syntax

SUBSET <selection-criteria>;


Details

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.

An editing statement, such as SUBSET, must follow the CREATE statement when you create a view descriptor. See CREATE for more information on the order of statements.

The selection-criteria argument can be either a WHERE clause or a SORT clause. For more information on the WHERE clause, see WHERE Clause in a View Descriptor. For more information on the SORT clause, see SORT Clause in a View Descriptor. You can use either SAS variable names or DBMS column names, in your selection criteria. Specify your WHERE clause and SORT clause by using separate SUBSET statements. For example, you can submit the following SUBSET statements:

    subset where jobcode = 1204;
    subset sort lastname;

The SAS System 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.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.