About SQL Procedure Interactions

Overview of SQL Procedure Interactions with SAS/ACCESS

The SQL procedure implements structured query language (SQL) for SAS software. For information about PROC SQL , see the Base SAS Procedures Guide. Here is how you can use SAS/ACCESS software for relational databases for PROC SQL interactions.

SQL Pass-Through Facility

The SQL pass-through facility uses SAS/ACCESS to connect to a DBMS and to send statements directly to the DBMS for execution. As an alternative to the SAS/ACCESS LIBNAME statement, this facility lets you use the SQL syntax of your DBMS. It supports any SQL that is not ANSI-standard that your DBMS supports.
Not all SAS/ACCESS interfaces support this feature, however. To determine whether it is available in your environment, see Introduction.
Here are the tasks that you can complete by using the SQL pass-through facility.
  • Establish and terminate connections with a DBMS using its CONNECT and DISCONNECT statements.
  • Send dynamic, non-query, DBMS-specific SQL statements to a DBMS using its EXECUTE statement.
  • Retrieve data directly from a DBMS using its CONNECTION TO component in the FROM clause of a PROC SQL SELECT statement.
You can use SQL pass-through facility statements in a PROC SQL query, or you can store them in an SQL view. When you create an SQL view, any arguments that you specify in the CONNECT statement are stored with the view. Therefore, when you use the view in a SAS program, SAS can establish the appropriate connection to the DBMS.

DBMS Interface Specifics for the SQL Pass-Through Facility

See the section for your interface for DBMS-specific details about the SQL pass-through facility.