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

Home -> Community -> Mailing Lists -> Oracle-L -> sqlldr question: How to set control file to load variable length data?

sqlldr question: How to set control file to load variable length data?

From: Guang Mei <zlmei_at_hotmail.com>
Date: Thu, 20 Jul 2000 16:53:01 GMT
Message-Id: <10564.112552@fatcity.com>


Hi:

I am trying to use sqlldr to load some text data into oracle db without much success.

The text file looks something like this:

1234567,ABC,999,aaa
5678,xy,this is col2,b
....

Basically it is a variable length fields with comma as separator. I have no problem using sqlldr to load fixed length data. But with variable length data, I tried several ways in control file such as:

LOAD DATA
INFILE 't1.dat'
INTO TABLE T1
FIELDS TERMINATED BY ','
(C1,

C2,
C3,
C4)

and

LOAD DATA
INFILE 't1.dat'
INTO TABLE T1
FIELDS TERMINATED BY ','
(C1 char(12),

C2, char(3),
C3, char(20)
C4  char(5))

and none of them worked. They always gave me Sql*loader-524 error: partial record found at end of datafile(t1.ctl). I also tried in file "t1.dat" to make sure the last record has extra carriage return. It does not seems to help.

I am suspecting that there might be something wrong in my control file syntax. Anyone know the correct syntax in control file to load my data? Thanks.

Guang



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com Received on Thu Jul 20 2000 - 11:53:01 CDT

Original text of this message

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