The DBLOAD Procedure for Relational Databases SQL Statement 323
defaults to the SAS variable name, or to the SAS variable label (if you have used
the LABEL statement).
column type
is generated from the SAS variable format.
nulls
uses the DBMS default value.
The variable-identifier argument can be either the SAS variable name or the
positional equivalent from the LIST statement. The positional equivalent is the number
that represents the variable’s place in the data set. For example, if you want to reset
the column associated with the third SAS variable, submit the following statement:
reset 3;
The RESET statement must be used after the LABEL statement for the LABEL
statement to take effect.
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 whether or not 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 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.
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;