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

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

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

From: Oliver Artelt <oli_at_md.transnet.de>
Date: Fri, 21 Jul 2000 00:39:15 +0200
Message-Id: <10564.112591@fatcity.com>


Maybe the records have variable columns. Try the NULLIF clause.

oli.

On Thu, 20 Jul 2000, Guang Mei wrote:
> 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
>
> --
> Author: Guang Mei
> INET: zlmei_at_hotmail.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
---

Oliver Artelt, System- und Datenbankadministration
---------------------------------------------------------------
  cubeoffice GmbH & Co.KG # jordanstrasse 7 # 39112 magdeburg
telefon: +49 (0)391 6 11 28 10 # telefax: +49 (0)391 6 11 28 10
   email: oli@cubeoffice.de # web: http://www.cubeoffice.de
Received on Thu Jul 20 2000 - 17:39:15 CDT

Original text of this message

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