Previous Page | Next Page

The DBLOAD Procedure for Relational Databases

SQL Statement


Submits a DBMS-specific SQL statement to the DBMS
SQL DBMS-specific-SQL-statement;


Details

The SQL statement submits a dynamic, non-query, DBMS-specific SQL statement to the DBMS. You can use the DBLOAD statement to submit these DBMS-specific SQL statements, despite whether you create and load a DBMS table.

You must enter the keyword SQL before each DBMS-specific SQL statement that 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 must 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, non-query 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.


Example

This 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;

Previous Page | Next Page | Top of Page