A SERVICE OF

logo

The DBLOAD Procedure for Relational Databases Appending a Data Set to a DBMS Table 325
WHERE Statement
Loads a subset of data into the new table
WHERE SAS-where-expression;
Details
The WHERE statement causes a subset of observations to be loaded into the new
DBMS table. The SAS-where-expression must be a valid SAS WHERE statement that
uses SAS variable names (not DBMS column names) as defined in the input data set.
The following example loads only the observations in which the SAS variable
COUNTRY has the value
BRAZIL:
where country=’Brazil’;
For more information on the syntax of the SAS WHERE statement, see SAS
Language Reference: Dictionary.
Example of Using the DBLOAD Procedure
Appending a Data Set to a DBMS Table
The following example appends new employee data from the SAS data set NewEmp
to the DBMS table Employees. The COMMIT statement causes a DBMS commit to be
issued after every 100 rows are inserted. The ERRLIMIT statement causes processing
to stop after 10 errors occur.
proc dbload dbms=oracle data=newemp append;
user=testuser;
password=testpass;
path=’myorapath’;
table=employees;
commit=100;
errlimit=10;
load;
run;
Note: By omitting the APPEND option from the DBLOAD statement, you can use
the PROC DBLOAD SQL statements to create a DBMS table and append to it in the
same PROC DBLOAD step.