
316 Database Connection Statements Appendix 2
appends data to an existing DBMS table that you identify by using the TABLE=
statement. When you specify APPEND, the input data specified with the DATA=
option is inserted into the existing DBMS table. Your input data can be in the form
of a SAS data set, PROC SQL view, or SAS/ACCESS view (view descriptor).
CAUTION:
When you use APPEND, you must ensure that your input data corresponds exactly to the
columns in the DBMS table. If your input data does not include values for all columns
in the DBMS table, you might corrupt your DBMS table by inserting data into the wrong
columns. Use the COMMIT, ERRLIMIT, and LIMIT statements to help safeguard against
data corruption. Use the DELETE and RENAME statements to drop and rename SAS input
variables that do not have corresponding DBMS columns.
All PROC DBLOAD statements and options can be used with APPEND, except for
the NULLS and TYPE statements, which have no effect when used with APPEND.
The LOAD statement is required.
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 five errors occur.
proc dbload dbms=oracle data=newemp append;
user=testuser;
password=testpass;
path=’myorapath’;
table=employees;
commit=100;
errlimit=5;
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.
Database Connection Statements
Provide DBMS connection information
database connection statements
These statements are used to connect to your DBMS and vary depending on which
SAS/ACCESS interface you are using. See the documentation for your SAS/ACCESS
interface for details. Examples include USER=, PASSWORD=, and DATABASE=.
ACCDESC= Statement
Creates an access descriptor based on the new DBMS table
ACCDESC=<libref.>access-descriptor;