Remote SQL Pass-Through (RSPT) Facility

EXECUTE... BY Statement

Submits SQL statements for server processing.

Syntax

EXECUTE (SQL-statement) BY server ;

Required Arguments

SQL-statement
specifies an SQL statement for server processing. SQL-statement can be any valid SAS SQL statement except SELECT. For a server DBMS that is accessed through a single-user server in a SAS/CONNECT session, SQL-statement is the same SQL statement that you would specify if you were connected directly to the DBMS.
server
specifies the server where the SQL statement will be processed. Here are the valid values for server:
REMOTE
the server that is specified in the most recent CONNECT TO REMOTE statement will be used.
alias
the server that you assigned the alias to (in the AS=alias option in the CONNECT TO REMOTE statement) will be used. Specifying alias is useful if you are connected to several SQL servers at the same time.