13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

432 EXECUTE Statement 4 Chapter 13ArgumentsUse one of these arguments with the DISCONNECT statement.dbms-namespecifies the database management system from which you want to disconnect.You must specify the DBMS name <strong>for</strong> your <strong>SAS</strong>/<strong>ACCESS</strong> interface , or use an aliasin the DISCONNECT statement.Note: If you used the CONNECT statement to connect to the DBMS, theDBMS name or alias in the DISCONNECT statement must match what youspecified in the CONNECT statement. 4aliasspecifies an alias that was defined in the CONNECT statement.ExampleTo exit the SQL pass-through facility, use the facilities DISCONNECT statement andthen QUIT the PROC SQL statement. This example disconnects the user from a DB2database with the alias DBCON1 and terminates the SQL procedure:proc sql;connect to db2 as dbcon1 (ssid=db2a);...more <strong>SAS</strong> statements...disconnect from dbcon1;quit;EXECUTE StatementSends DBMS-specific, non-query SQL statements to the DBMSValid in: PROC SQL steps (when accessing DBMS data using <strong>SAS</strong>/<strong>ACCESS</strong> software)SyntaxEXECUTE (dbms-specific-sql-statement) BYdbms-name | alias;The EXECUTE statement sends dynamic non-query, DBMS-specific SQL statementsto the DBMS and processes those statements.In some <strong>SAS</strong>/<strong>ACCESS</strong> interfaces, you can issue an EXECUTE statement directlywithout first explicitly connecting to a DBMS. (See CONNECT statement.) If you omitthe CONNECT statement, an implicit connection is per<strong>for</strong>med (by using default values<strong>for</strong> all database connection arguments) when the first EXECUTE statement is passed tothe DBMS. See the documentation <strong>for</strong> your <strong>SAS</strong>/<strong>ACCESS</strong> interface <strong>for</strong> details.The EXECUTE statement cannot be stored as part of an SQL pass-through facilityquery in a PROC SQL view.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!