Re: Sql*Loader: Loading fields containing newlines from a data file

From: Peter German <P.German_at_integrity.nl>
Date: 1996/08/06
Message-ID: <32075495.82024072_at_news.tip.nl>#1/1


John Jones <jmj22026_at_us0n05.glaxo.com> wrote:

>Peter German wrote:
>>
>> We have a data file containing the following records:
>>
>> 1|bla
>> bla
>> 2|bla
>> bla
>>
>> The table definition is as follows:
>>
>> TABLE text
>> key NUMBER(9)
>> tekst LONG
>>
>> We want to use SQL*Loader to load the data from the file into this
>> table, but SQL*loader has problems with the newlines which are part of
>> the data.
>>
>> Also using ENCLOSED BY doesn't seem to work.
>>
>> Does anyone out there have a solution. If nessecary, we can change the
>> format of the data file.
>>
>> Thanks in advance,
>>
>> Peter.I had this very same problem. The newline is being read as a
>new record by SQL*Loader. The work around we did was to replace
>the newlines with some special character, load the data, and
>then use the Oracle function replace(). Since you said that you
>could change the data file, this should work for you.

I've tried to replace the newlines and load the data into Oracle and it works. But the data is put into a field of type LONG so I can't use the function replace(), it's only for CHAR and VARCHAR2. I'm very surprised about the fact that it is so difficult to insert ASCII-text data into Oracle.

Peter. Received on Tue Aug 06 1996 - 00:00:00 CEST

Original text of this message