• You cannot update a view that contains an ORDER BY.
Note: Beginning with SAS 9, PROC SQL views, the pass-through facility, and the
SAS/ACCESS LIBNAME statement are the preferred ways to access relational
DBMS data. SAS/ACCESS views are no longer recommended. You can convert
existing SAS/ACCESS views to PROC SQL views by using the CV2VIEW
procedure. For more information, see “CV2VIEW” in SAS/ACCESS for Relational
Databases: Reference.
Using the Output Delivery System with PROC
SQL
The Output Delivery System (ODS) enables you to produce the output from PROC SQL
in a variety of different formats such as PostScript, HTML, or list output. ODS defines
the structure of the raw output from SAS procedures and from the SAS DATA step. The
combination of data with a definition of its output structure is called an output object.
Output objects can be sent to any of the various ODS destinations, which include listing,
HTML, output, and printer. When new destinations are added to ODS, they
automatically become available to PROC SQL, to all other SAS procedures that support
ODS, and to the DATA step. For more information about ODS, see the SAS Output
Delivery System: User's Guide.
The following example opens the HTML destination and specifies ODSOUT.HTM as
the file that will contain the HTML output. The output from PROC SQL is sent to
ODSOUT.HTM.
Note: This example uses filenames that might not be valid in all operating
environments. To run the example successfully in your operating environment, you
might need to change the file specifications.
Note: Some browsers require an extension of HTM or HTML on the filename.
libname sql 'SAS-library';
ods html body='odsout.htm';
proc sql outobs=12;
title 'Coordinates of U.S. Cities';
select *
from sql.uscitycoords;
174 Chapter 5 • Programming with the SQL Procedure