Skip to main content
ARS Home » Research » Publications at this Location » Publication #182843

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
Publication Acceptance Date: 8/1/2005
Publication Date: 9/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.