Animal Improvement Programs Site Logo
Agricultural Research Service United States Department of Agriculture
 
Research Project: IMPROVING GENETIC PREDICTION OF ECONOMIC MERIT OF DAIRY ANIMALS

Location: Animal Improvement Programs

Title: DATABASE ACCESS BASICS: SQL AND DATA STOP INTERFACE TO RELATIONAL DATABASES

Author
item Sanders, Ashley

Submitted to: Proceedings of SAS Users Group
Publication Type: Proceedings/Symposium
Publication Acceptance Date: August 1, 2005
Publication Date: September 11, 2005
Citation: Sanders, A.H. 2005. Database access basics: sql and data stop interface to relational databases. Proceedings of 18th Annual Northeast SAS Users Group Conference, September 11-14, 2005, Portland, Maine. 8 pp.

Interpretive Summary: SAS/ACCESS provides virtually seamless interaction with relational databases such as DB2. The SQL passthrough facility gives direct access to the database, but requires knowledge of the native SQL syntax. Alternately, the libname statement can be used to assign SAS library references to database objects, allowing database tables to be used like SAS data sets. SAS SQL functions are available that cannot be used with the pass-through facility. For data step diehards, database tables can be treated (almost) just like indexed SAS data sets. SAS statistical procedures can also reference database tables directly using the libref name. This paper covers the basics of accessing database data from SAS using SQL and data step language, using the database with SAS procedures, and getting information about the database delivered through SAS.

Technical Abstract: SAS/ACCESS provides virtually seamless interaction with relational databases such as DB2. The SQL passthrough facility gives direct access to the database, but requires knowledge of the native SQL syntax. Alternately, the libname statement can be used to assign SAS library references to database objects, allowing database tables to be used like SAS data sets. SAS SQL functions are available that cannot be used with the pass-through facility. For data step diehards, database tables can be treated (almost) just like indexed SAS data sets. SAS statistical procedures can also reference database tables directly using the libref name. This paper covers the basics of accessing database data from SAS using SQL and data step language, using the database with SAS procedures, and getting information about the database delivered through SAS.

     
Last Modified: 02/22/2009