Re: Can SQL*Loader insert linefeeds?

From: Ron <rmoeller_at_ladc.lockheed.com>
Date: 1997/02/10
Message-ID: <32FF8BED.372D_at_ladc.lockheed.com>#1/1


Dirk Schmatz wrote:
>
> How do I make SQL*Loader recognize the linefeeds in a text file?
>
> I want to use SQL*Loader to load a text file (Arc/Info moss file
> containing polygons) into a table column of data type LONG. (We use Oracle
> 7.3.2.1.0 with SQL*Loader 7.3.2.2.0.)
>
> We loaded the file using the CONTINUEIF statement but then the whole text
> appears on the same line when selected from the table. However, to be
> able to rebuild a text file, the linefeeds should be included
> (e.g.like in the TEXT column of the dictionary view "user_views").
> How can we do this?
>
> Thank you for any hints
>
> Dirk

I loaded my data into a temporary table breaking up the line using:

text_1 position(xxx:yyy) char nullif text_1=BLANKS, text_2 position(yyy+1:zzz) char nullif text_2=BLANKS, ...

Then I updated my file using SQL like:

update TABLE t set field =

       (select text_1||chr(10)||
               text_2||chr(10)||
               ...
        from temp_table tp
        where t.key = tp.key);

The carraige returns "chr(10)" made my text look as desired in my varchar(2000) field.

Hope this helps,
Ron Received on Mon Feb 10 1997 - 00:00:00 CET

Original text of this message