Chapter Contents |
Previous |
Next |
SQL |
Optional statement |
Syntax | |
Details | |
Example |
Syntax |
SQL DBMS-specific SQL-statement; |
You must enter the keyword SQL before each DBMS-specific SQL statement you submit. The SQL-statement argument can be any valid dynamic DBMS-specific SQL statement except the SELECT statement. However, you can enter a SELECT statement as a substatement within another statement, such as in a CREATE VIEW statement. You use DBMS-specific SQL object names and syntax in the DBLOAD SQL statement.
You cannot create a DBMS table and reference it in your DBMS-specific SQL statements within the same PROC DBLOAD step. The new table is not created until the RUN statement is processed.
To submit dynamic, nonquery DBMS-specific SQL statements to the DBMS without creating a DBMS table, you use the DBMS= option, any database connection statements, and the SQL statement.
The SQL statement might be case sensitive; see your DBMS chapter for details.
An editing statement, such as SQL, must be specified after the database connection statements.
Example |
The following PROC DBLOAD example grants UPDATE privileges to user MARURI on the DB2 SASDEMO.ORDERS table.
proc dbload dbms=db2; in sample; sql grant update on sasdemo.orders to maruri; run;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.