A SERVICE OF

logo

306 SUBSET Statement Appendix 1
ALL
includes in the view descriptor all the columns that were defined in the access
descriptor and that were not dropped.
column-identifier
can be either the DBMS column name or the positional equivalent from the LIST
statement, which is the number that represents the column’s place in the access
descriptor on which the view is based. For example, to select the first three columns,
submit the following statement:
select 1 2 3;
If the column name contains lowercase characters, special characters, or national
characters, enclose the name in quotation marks.
Details
The SELECT statement is required. The SELECT statement specifies which DBMS
columns in an access descriptor to include in a view descriptor.
SELECT statements are cumulative within a view creation. That is, if you submit
the following two SELECT statements, columns 1, 5, and 6 are selected:
select 1;
select 5 6;
To clear your current selections when creating a view descriptor, use the
RESET ALL
statement.
SUBSET Statement
Adds or modifies selection criteria for a view descriptor
Applies to:
view descriptor
SUBSET selection-criteria;
selection-criteria
one or more DBMS-specific SQL expressions that are accepted by your DBMS, such
as WHERE, ORDER BY, HAVING, and GROUP BY. Use DBMS column names, not
SAS variable names, in your selection criteria.
Details
You can 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.
For example, for a view descriptor that retrieves rows from a DBMS table, you could
submit the following SUBSET statement:
subset where firstorder is not null;