Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: sql*loader question

Re: sql*loader question

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Wed, 11 Jul 2001 05:06:34 -0700
Message-ID: <3B4C414A.356876CA@exesolutions.com>

kazelot_at_thenut.eti.pg.gda.pl wrote:

> I have a text file:
> Circuit ID: STF1 1-25 Date: 24 Apr 01
> Test Result: PASS Cable Type: Cat 5 UTP
> [page break]
> Circuit ID: STF1 1-24 Date: 24 Apr 01
> Test Result: PASS Cable Type: Cat 5 UTP
> [page break]
>
> I would like to import the data to oracle. Can someone suggest me
> the controlfile that would do it? I have no idea how to deal with it.
>
> Not to make Sybrand Bakker angry, I include my oracle version: 8.1.7.
> (BTW: Sybrand, thanks for the help with sending mail from oracle.)
>
> Thanks in advance,
> kazelot

Try modifying this to do the job:

LOAD DATA
INFILE 'e:\load\demo2.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)

The numbers within the paranthesis are the starting and ending positions within the record for the data.

Daniel A. Morgan Received on Wed Jul 11 2001 - 07:06:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US