CONNECTION TO

Retrieves and uses DBMS data in a PROC SQL query or view.

Tip: You can use CONNECTION TO in the SELECT statement's FROM clause as part of the from-list.
See: Connecting to a DBMS by Using the SQL Procedure Pass-Through Facility
SAS/ACCESS documentation

Syntax

CONNECTION TO dbms-name (dbms-query)
CONNECTION TO alias (dbms-query)

Required Arguments

alias

specifies an alias, if one was defined in the CONNECT statement.

dbms-name

identifies the DBMS that you are using.

dbms-query

specifies the query to send to a DBMS. The query uses the DBMS's dynamic SQL. You can use any SQL syntax that the DBMS understands, even if that syntax is not valid for PROC SQL. For example, your DBMS query can contain a semicolon.

The DBMS determines the number of tables that you can join with dbms-query. Each CONNECTION TO component counts as one table toward the 256-table PROC SQL limit for joins.
See SAS/ACCESS for Relational Databases: Reference for more information about DBMS queries.