13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

904 SUBSET Statement 4 Appendix 1column-identifiercan be either the DBMS column name or the positional equivalent from the LISTstatement. The positional equivalent is the number that represents where thecolumn is located in the access descriptor on which the view is based. For example,to select the first three columns, submit this statement:select 1 2 3;If the column name contains lowercase characters, special characters, or nationalcharacters, enclose the name in quotation marks.DetailsThe SELECT statement is required. The SELECT statement specifies which DBMScolumns in an access descriptor to include in a view descriptor.SELECT statements are cumulative within a view creation. That is, if you submitthe following 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 ALLstatement.SUBSET StatementAdds or modifies selection criteria <strong>for</strong> a view descriptorApplies to: view descriptorSUBSET selection-criteria;selection-criteriaone or more DBMS-specific SQL expressions that are accepted by your DBMS, suchas WHERE, ORDER BY, HAVING, and GROUP BY. Use DBMS column names, not<strong>SAS</strong> variable names, in your selection criteria.DetailsYou can use the SUBSET statement to specify selection criteria when you create aview descriptor. This statement is optional. If you omit it, the view retrieves all data(rows) in the DBMS table.For example, you could submit the following SUBSET statement <strong>for</strong> a viewdescriptor that retrieves rows from a DBMS table:subset where firstorder is not null;If you have multiple selection criteria, enter them all in one SUBSET statement, asshown in this example:subset where firstorder is not nulland country = ’USA’order by country;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!