Re: how to user sqlldr in this case.

From: Romeo Olympia <rolympia_at_hotmail.com>
Date: 3 Sep 2004 11:07:32 -0700
Message-ID: <42fc55dc.0409031007.327fde9e_at_posting.google.com>


You could try searching this site for: "tab-delimited". You'd find that the answer would be to specify:

FIELDS TERMINATED BY x'09'

Cheers.

"Yang Lee" <yang__lee_at_ausi.com> wrote in message news:<d2e9d8b6e9dc6eaadd37919ecc3475f1.93862_at_mygate.mailgate.org>...
> Hi all,
> I have a huge data in a text file.
>
> 10 12223 closed 647 90
> 10 90
> 10 67 90
> 10 12a closed
> 10 123r closed 67 90
>
> each field is separated by a tab and each field is of different length.
> and many fields as you see are NULL.
> Now I want to use sqlldr.exe
> to load the data in my table I use following
> control file WITH my text data file renamed as etc.dat.
>
> LOAD DATA
> INFILE 'etc.dat'
> BADFILE 'sample.bad'
> DISCARDFILE 'sample.dsc'
> APPEND
> INTO TABLE mytable
> TRAILING NULLCOLS
> (
> fname INTEGER TERMINATED BY " " NULLIF mname=BLANKS ,
> mname CHAR TERMINATED BY " " NULLIF mname=BLANKS ,
> lname CHAR TERMINATED BY WHITESPACE,
> gname CHAR TERMINATED BY WHITESPACE,
> hname INTEGER TERMINATED BY WHITESPACE,
> )
>
> it doesn't solve the purpose. please provide me correct control file.
> Thanks a lot in advance,
> Lee
Received on Fri Sep 03 2004 - 20:07:32 CEST

Original text of this message