Re: Sql*Loader

From: Dyrson Rodrigues Alves Junior <dyrson_at_casasoft.com.br>
Date: Tue, 27 Apr 1999 10:06:50 -0400
Message-ID: <3725C51E.2C2BC93D_at_casasoft.com.br>


nenadjak2_at_my-dejanews.com wrote:

> I just started to read about sql*loader but still
> I have no Idea how to start loader.

First you should create a control file in order to define how the data will be loaded. Itīs something like this:

LOAD DATA
INFILE 'ulcase2.dat'
INTO TABLE EMP

( EMPNO    POSITION(01:04) INTEGER EXTERNAL,
  ENAME    POSITION(06:15) CHAR,
  JOB      POSITION(17:25) CHAR,
  MGR      POSITION(27:30) INTEGER EXTERNAL,
  SAL      POSITION(32:39) DECIMAL EXTERNAL,
  COMM     POSITION(41:48) DECIMAL EXTERNAL,
  DEPTNO   POSITION(50:51) INTEGER EXTERNAL)

Your ulcase2.dat (in the example) data file would be something like this:

7782 CLARK      MANAGER   7839  2572.50          10 
7839 KING       PRESIDENT       5500.00          10 
7934 MILLER     CLERK     7782   920.00          10 
7566 JONES      MANAGER   7839  3123.75          20 
7499 ALLEN      SALESMAN  7698  1600.00   300.00 30 
7654 MARTIN     SALESMAN  7698  1312.50  1400.00 30 
7658 CHAN       ANALYST   7566  3450.00          20 

Then you just call the loader from the dos prompt: sqlload username/password control=<name of the control file> log=<name of a log file>
Hope this helps.

-- 
+-------------------------------+----------------------------------+
[Quoted] [Quoted] | Dyrson Rodrigues Alves Junior | Casa de Software                 |
| Analista de Sistemas          | Oracle Approved Education Center |
| mailto:dyrson_at_casasoft.com.br | http://www.casasoft.com.br       |
+-------------------------------+----------------------------------+
Received on Tue Apr 27 1999 - 16:06:50 CEST

Original text of this message