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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Data import

Re: Data import

From: Bernard Polarski <bpolarsk_at_yahoo.com>
Date: Mon, 21 Feb 2000 15:19:23 GMT
Message-ID: <88rl1o$6ai$1@nnrp1.deja.com>


In article <38AC2CD6.111B0E33_at_gestion400.com>,   Lars Lathan <larslathan_at_gestion400.com> wrote:
> Hello,
>
> how do I import data from a .txt file seperated by | into a oracle
> database table?
>
> My Oracle Database is version 8.0.5.
>
> Thanks, Lars.
>
>

Jerry, that 's not a nice answer. Here is a bit help better than 'RTFM' :

use sqlloader, ie : for a table 'SEC' with a control file 'sec.ctl'

 Name                            Null?    Type
 ------------------------------- -------- ----
 LOG_ID                          NOT NULL NUMBER(38)
 BLOB_ORDINAL                    NOT NULL NUMBER(38)
 BLOB_DATA                       NOT NULL VARCHAR2(255)


The 'sec.ctl' control file



load data
infile 'sec.txt'
into table sec
fields terminated by '|'optionally enclosed by '"'

(
  LOG_ID,
  BLOB_ORDINAL,
  BLOB_DATA
)


Type command :

sqlloader userid=myuser/mypass control=sec.ctl log=sec.log bad=sec.bas

--
B.Polarski

http://www.geocities.com/bpolarsk
Email : bpolarsk_at_yahoo.com

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Feb 21 2000 - 09:19:23 CST

Original text of this message

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