O'Reilly logo

SAS 9.4 SQL Procedure User's Guide, Fourth Edition, 4th Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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: Users 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
Output 5.11 The Coordinates of U.S. Cities
Using the Output Delivery System with PROC SQL 175
176 Chapter 5 Programming with the SQL Procedure

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required