Overview of SAS/ACCESS Interface to Relational Databases |
SAS/ACCESS enables you to create a SAS view of data that exists in a relational database management system. A SAS data view defines a virtual data set that is named and stored for later use. A view contains no data, but rather describes data that is stored elsewhere. There are three types of SAS data views:
SQL views are stored query expressions that read data values from their underlying files, which can include SAS data files, SAS/ACCESS views, DATA step views, other SQL views, or relational database data.
SAS/ACCESS views (also called view descriptors) describe data that is stored in DBMS tables. This is no longer a recommended method for accessing relational DBMS data. Use the CV2VIEW procedure to convert existing view descriptors into SQL views.
You can use all types of views as inputs into DATA steps and procedures. You can specify views in queries as if they were tables. A view derives its data from the tables or views that are listed in its FROM clause. The data accessed by a view is a subset or superset of the data in its underlying table(s) or view(s).
You can use SQL views and SAS/ACCESS views to update their underlying data if the view is based on only one DBMS table or if it is based on a DBMS view that is based on only one DBMS table and if the view has no calculated fields. You cannot use DATA step views to update the underlying data; you can use them only to read the data.
Your options for creating a SAS view of DBMS data are determined by the SAS/ACCESS feature that you are using to access the DBMS data. This table lists the recommended methods for creating SAS views.
Feature You Use to Access DBMS Data | SAS View Technology You Can Use |
---|---|
SAS/ACCESS LIBNAME statement | SQL view or DATA step view of the DBMS table |
SQL Pass-Through Facility | SQL view with CONNECTION TO component |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.