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: multiple-line csv import

Re: multiple-line csv import

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Tue, 08 Jul 2003 23:38:11 GMT
Message-ID: <DBIOa.34$aJ6.11@news02.roc.ny>

"Ralf" <Threepwood.Guybrush_at_gmx.de> wrote in message news:71cfc7f.0307070656.3122f03d_at_posting.google.com...
> Hi,
> I try to import a CSV file to a Oracle database using the SQL*Loader.
> My problems are multiple-line text fields. Example:
>
> ID;NAME;INFO;GENDER
> 1;James;"My new butler,
> a lame guy";male
> 2;Fry;"The pizza guy,
> what a man!";male
>
>
> The control file looks like this:
>
> LOAD DATA
> INFILE 'c:\dev\import_.csv'
> APPEND
> INTO TABLE wais
> FIELDS TERMINATED BY ';'
> TRAILING NULLCOLS
> (
> ID INTEGER,
> NAME CHAR TERMINATED BY ';',
> INFO CHAR TERMINATED BY ';' ENCLOSED BY '"',
> GENDER CHAR TERMINATED BY ';'
> )
>
>
> CONTINUEIF could be the solution, but I didn't find out how to use it
> correctly.
>
> Thanx in advance.
>
> Ralf

I'm afraid that in your exact case ... there is no solution other than fixing the data file to contain records in one line. continueif might work if you designate a continuation character.

Anurag Received on Tue Jul 08 2003 - 18:38:11 CDT

Original text of this message

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