Chapter Contents

Previous

Next
LOAD

LOAD



Creates and loads the new DBMS table.

Required statement for loading or appending data


Syntax
Details
Sending a DBMS-specific, Nonquery Statement
Example

Syntax

LOAD;

Details

The LOAD statement informs the DBLOAD procedure to execute the action that you request, including loading or appending data. This statement is required to create and load a new DBMS table or to append data to an existing table.

When you create and load a DBMS table, you must place statements or groups of statements in a certain order after the PROC DBLOAD statement and its options, as listed below:

  1. Database connection statements: Check your DBMS chapter for the appropriate statements for your DBMS. After the database connection statements, specify the TABLE statement.

  2. Editing statements: ACCDESC=, COMMIT=, DELETE, ERRLIMIT=, LABEL, LIMIT=, LIST, NULLS, RENAME, RESET, SQL, TYPE, and WHERE. The order within this group usually does not matter; see the individual statements for more information.

  3. Creating and Loading statement: LOAD must appear last before RUN to create and load a table or append data to a table.

  4. RUN statement: This statement is used to process the DBLOAD procedure. If you specify QUIT instead of RUN, PROC DBLOAD terminates without completing your request.


Sending a DBMS-specific, Nonquery Statement

If you use the DBLOAD procedure only to submit DBMS-specific, nonquery SQL statements to the DBMS (and not to load a table), omit the LOAD statement. The order of the statements listed above is the same. See SQL for more information on this process.


Example

The following example creates the SUMMERTEMPS table in ORACLE based on the DLIB.TEMPEMPS data file. See Appendix 1, "Sample Data" for a description of this file.

proc dbload dbms=oracle data=dlib.tempemps;
    user=testuser; password=testpass;
    path='testpath';
    table=summertemps;
    rename firstnam=firstname
           middlena=middlename;
    type hiredate 'date'
         empid 'number(6,0)'
         familyid 'number(6,0)';
    nulls 1=n;
    list;
    load;
run;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.