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.

847CHAPTER29Accessing DBMS Data with theLIBNAME StatementAbout the LIBNAME Statement Sample Code 847Creating <strong>SAS</strong> Data Sets from DBMS Data 848Overview 848Using the PRINT Procedure with DBMS Data 848Combining DBMS Data and <strong>SAS</strong> Data 849Reading Data from Multiple DBMS Tables 850Using the DATA Step UPDATE Statement with DBMS Data 850Using the SQL Procedure with DBMS Data 851Overview 851Querying a DBMS Table 851Querying Multiple DBMS Tables 854Updating DBMS Data 856Creating a DBMS Table 858Using Other <strong>SAS</strong> Procedures with DBMS Data 859Overview 859Using the MEANS Procedure 859Using the DATASETS Procedure 860Using the CONTENTS Procedure 861Using the RANK Procedure 862Using the TABULATE Procedure 863Using the APPEND Procedure 864Calculating Statistics from DBMS Data 864Selecting and Combining DBMS Data 865Joining DBMS and <strong>SAS</strong> Data 866About the LIBNAME Statement Sample CodeThe examples in this section demonstrate how to use the LIBNAME statement toassociate librefs with DBMS objects, such as tables and views. The LIBNAMEstatement is the recommended method <strong>for</strong> accessing DBMS data from within <strong>SAS</strong>.These examples work with all <strong>SAS</strong>/<strong>ACCESS</strong> relational interfaces. Follow these stepsto run these examples.1 Modify and submit the ACCAUTO.<strong>SAS</strong> file, which creates the appropriateLIBNAME statements <strong>for</strong> each database.2 Submit the ACCDATA.sas program to create the DBMS tables and <strong>SAS</strong> data setsthat the sample code uses.3 Submit the ACCRUN.sas program to run the samples.These programs are available in the <strong>SAS</strong> Sample Library. If you need assistancelocating the Sample Library, contact your <strong>SAS</strong> support consultant. See “Descriptions of

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

Saved successfully!

Ooh no, something went wrong!