13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

914 PROC DBLOAD Statement 4 Appendix 2LOAD;RUN;PROC DBLOAD StatementPROC DBLOAD ;OptionsDBMS=database-management-systemspecifies which database management system you want to access. ThisDBMS-specific option is required. See the DBMS-specific reference in this document<strong>for</strong> details about your DBMS.DATA=<strong>SAS</strong>-data-setspecifies the input data set. You can retrieve input data from a <strong>SAS</strong> data file, an SQLview, a DATA step view, a <strong>SAS</strong>/<strong>ACCESS</strong> view descriptor, or another DBMS table towhich a <strong>SAS</strong>/<strong>ACCESS</strong> libref points. If the <strong>SAS</strong> data set is permanent, you must useits two-level name, libref.<strong>SAS</strong>-data-set. If you omit the DATA= option, the default isthe last <strong>SAS</strong> data set that was created.APPENDappends 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 <strong>for</strong>mof a <strong>SAS</strong> data set, SQL view, or <strong>SAS</strong>/<strong>ACCESS</strong> view (view descriptor).CAUTION:When you use APPEND, you must ensure that your input data corresponds exactly to thecolumns in the DBMS table. If your input data does not include values <strong>for</strong> all columnsin the DBMS table, you might corrupt your DBMS table by inserting data into the wrongcolumns. Use the COMMIT, ERRLIMIT, and LIMIT statements to help safeguard againstdata corruption. Use the DELETE and RENAME statements to drop and rename <strong>SAS</strong> inputvariables that do not have corresponding DBMS columns. 4All PROC DBLOAD statements and options can be used with APPEND, except <strong>for</strong>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 <strong>SAS</strong> data setNEWEMP to the DBMS table EMPLOYEES. The COMMIT statement causes aDBMS commit to be issued after every 100 rows are inserted. The ERRLIMITstatement 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;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!