The SQL Pass-Through Facility for Relational Databases |
This section presents the syntax for the SQL pass-through
facility statements and the CONNECTION TO component. For DBMS-specific details,
see the documentation for your SAS/ACCESS interface.
CONNECT TO dbms-name <AS alias> <(<database-connection-arguments>
<connect-statement-arguments>
)>;
|
EXECUTE (dbms-specific-SQL-statement) BY
dbms-name | alias;
|
SELECT column-list FROM CONNECTION
TO dbms-name | alias (dbms-query)
|
As you use the PROC SQL statements that are available in the
SQL pass-through facility, any error return codes and error messages are written
to the SAS log. These codes and messages are available to you through these
SAS macro variables:
-
SQLXRC
-
contains the DBMS return code that identifies
the DBMS error.
-
SQLXMSG
-
contains descriptive information about the
DBMS error that the DBMS generates.
The contents of the SQLXRC and SQLXMSG macro variables
are printed in the SAS log using the %PUT macro. They are reset after each
SQL pass-through facility statement has been executed.
See Macro Variables for Relational Databases for more information about these
return codes.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.