CONNECTION TO Statement

Enables you to send SELECT queries to the SPD Server SQL processor using explicit SQL pass-through.

Valid in: SPD Server

Syntax

CONNECTION TO [engine-name | alias] (SQL-query);

Required Arguments

engine-name or alias

specify SASSPDS to obtain a pass-through connection to the server’s SQL processor from PROC SQL. Specify SPDSENG to obtain a secondary pass-through connection from the server’s SQL processor to another server.

Note: SPDSENG is the engine that you use to reference an SPD Server from within an existing server SQL explicit pass-through connection. For more information about nesting connections, see Nesting SQL Pass-Through Access.

alias

specifies the alias that was used in the CONNECT statement.

(SQL-query)

specifies the SELECT query that you want to send. Your SELECT query cannot contain a semicolon because a semicolon represents the end of a statement to the server. Character literals are limited to 32,000 characters. Make sure that your SELECT query is enclosed in parentheses.

Details

CONNECTION TO is an SQL explicit pass-through component that you can use in the FROM clause of a PROC SQL SELECT statement to connect to SPD Server. The CONNECTION TO component enables you to make SQL explicit pass-through queries for server data and to use that data in a PROC SQL query or table. PROC SQL treats the results of the query like a virtual table.
SPD Server SQL does not support the full SELECT functionality of SAS SQL. For more information, see Understanding the SPD Server SQL Processor.
For SELECT syntax, see SAS SQL Procedure User’s Guide.
Last updated: February 8, 2017