A PROC SQL view is a
stored query expression that reads data values from its underlying
files, which can include SAS data files, DATA step views, other PROC
SQL views, or DBMS data.
You can
refer to 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 that is accessed by a view is a subset or superset of the
data that is in its underlying table(s) or view(s).
proc sql;
create view sasuser.raisev as
select empid, jobcode,
salary format=dollar12.2,
salary/12 as MonthlySalary
format=dollar12.2
from payrollmaster;
select *
from sasuser.raisev
where jobcode in ('PT2','PT3'),
|
|
PROC SQL views
-
can be used in SAS programs in
place of an actual SAS data file
-
can be joined with tables or other
views
-
can be derived from one or more
tables, PROC SQL views, or DATA step views
-
can access data from a SAS data
set, a DATA step view, a PROC SQL view, or a relational database table
-
extract underlying data, which
enables you to access the most current data.