The SQL procedure implements
the Structured Query Language (SQL) for SAS. See
SAS SQL Procedure User's Guide for PROC SQL information. You can send data
source-specific SQL statements directly to a data source using an
extension to the SQL procedure called the pass-through facility.
This facility uses
SAS/ACCESS
to connect to a data source and to send statements directly to the
data source for execution. This facility is an alternative to the
SAS/ACCESS LIBNAME statement. It enables you to use the SQL syntax
of your data source, and it supports any non-ANSI standard SQL that
is supported by your data source.
You can use the pass-through
facility for the following tasks:
-
Establish and terminate connections
with a data source using the pass-through facility CONNECT and DISCONNECT
statements.
-
-
Retrieve data directly from a data
source using the
CONNECTION TO Component component of the pass-through facility in the FROM clause
of a PROC SQL SELECT statement.
You can use pass-through
facility statements in a PROC SQL query or you can store the queries
in a PROC SQL view. When you create an SQL view, any arguments that
you specify in the CONNECT statement are stored with the view. Therefore,
when the view is used in a SAS program, SAS can establish the appropriate
connection to the data source.
The following sections
present the syntax for the pass-through facility statements and the
CONNECTION TO component. You can use this component with the PROC
SQL SELECT statement to query data from a data source.