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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

922 TABLE= Statement 4 Appendix 2DetailsThe SQL statement submits a dynamic, non-query, DBMS-specific SQL statement tothe DBMS. You can use the DBLOAD statement to submit these DBMS-specific SQLstatements, despite whether you create and load a DBMS table.You must enter the keyword SQL be<strong>for</strong>e each DBMS-specific SQL statement that yousubmit. The SQL-statement argument can be any valid dynamic DBMS-specific SQLstatement except the SELECT statement. However, you can enter a SELECT statementas a substatement within another statement, such as in a CREATE VIEW statement.You must use DBMS-specific SQL object names and syntax in the DBLOAD SQLstatement.You cannot create a DBMS table and reference it in your DBMS-specific SQLstatements within the same PROC DBLOAD step. The new table is not created untilthe RUN statement is processed.To submit dynamic, non-query DBMS-specific SQL statements to the DBMS withoutcreating a DBMS table, you use the DBMS= option, any database connectionstatements, and the SQL statement.ExampleThis example grants UPDATE privileges to user MARURI on the DB2SasDemo.Orders table.proc dbload dbms=db2;in sample;sql grant update on sasdemo.orders to maruri;run;TABLE= StatementNames the DBMS table to be created and loadedTABLE= DBMS-specific-syntax;DetailsWhen you create and load or append to a DBMS table, the TABLE= statement isrequired. It must follow other database connection statements such as DATABASE= orUSER=. The TABLE= statement specifies the name of the DBMS table to be createdand loaded into a DBMS database. The table name must be a valid table name <strong>for</strong> theDBMS. (See the DBMS-specific reference in this document <strong>for</strong> the syntax <strong>for</strong> yourDBMS.) If your table name contains lowercase characters, special characters, ornational characters, it must be enclosed in quotation marks.In addition, you must specify a table name that does not already exist. If a table bythat name exists, an error message is written to the <strong>SAS</strong> log, and the table specified inthis statement is not loaded.When you are submitting dynamic DBMS-specific SQL statements to the DBMSwithout creating and loading a table, do not use this statement.

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

Saved successfully!

Ooh no, something went wrong!