Re: Loading data with SQL*LOADER in Oracle 7.1 WGS SCO

From: Antony Sampson <sampson_at_dtf.sa.gov.au>
Date: 1996/01/18
Message-ID: <1127cc$f1f33.1a4_at_murdoch.systems.sa.gov.au>#1/1


pgouessa_at_planete.net (Pascal GOUESSAN) wrote:

>How can i insert string with multiple carriage return in a database
>string field, using SQL*LOADER ?
>The SQL*LOADER takes an ASCII file input !! so the carriage return
>makes a new record !!
 

>Help ! Thanks....

If you can arrange for the last character of each line that you want concatenated on to be a sentinel character (e.g: the full colon or something) you can specify in your control file

CONTINUEIF LAST = (:) The problem with this is that all your lines will be concatenated together, with the carriage returns removed. If you include two instances of the sentinel character before each instance of the carriage returns you want retained, one will be removed by the load, then you should be able to do an update, replacing the second instance of the character ':' with the character code that equates to the carriage return in your system i.e:

update <table> set <field> = replace(<field>, ':', chr(code for CR on your system)).

Voile!

hope this helps,



Tony Sampson
DBA/software terrorist, South Australian Government Financing Authority sampson_at_dtf.sa.gov.au
                   The unnatural, that too is natural.
                                  Goethe
Received on Thu Jan 18 1996 - 00:00:00 CET

Original text of this message