Chapter Contents

Previous

Next
SAS/ACCESS Software for Relational Databases: Reference

What Are Views?

A SAS data view defines a virtual data set that is named and stored for later use. A view contains no data but describes or defines data that are stored elsewhere. There are three types of SAS data views:

You can specify views in queries as if they were tables. The view derives its data from the tables or views that are listed in its FROM clause. The data accessed by a view are a subset or superset of the data in its underlying table(s) or view(s).

A PROC SQL view is a SAS file of type VIEW created by PROC SQL. A PROC SQL view contains no data. It is a stored query expression that reads data values from its underlying files, which can include SAS data files, SAS/ACCESS views, DATA step views, other PROC SQL views, or relational DBMS data. When executed, a PROC SQL view's output can be a subset or superset of one or more underlying files. Beginning in Version 7, you can reference a simple PROC SQL view to update its underlying data.

SAS/ACCESS views and DATA step views are similar to PROC SQL views in that they are both data definitions of member type VIEW. SAS/ACCESS views describe data in DBMS tables from other software vendors. DATA step views are stored, compiled DATA step programs.

PROC SQL views can be used to update their underlying data if the view is based on only one DBMS table or on a DBMS view that is based on only one DBMS table and has no calculated fields. DATA step views can only read their underlying data.

You can use all types of views as input into DATA steps and procedures.

Note:   In this chapter, the term view refers to PROC SQL views, DATA step views, and SAS/ACCESS views, unless otherwise noted.  [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.