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 -> loading data with '\n' using sql-loader

loading data with '\n' using sql-loader

From: <adil_at_msil.sps.mot.com>
Date: Mon, 04 Oct 1999 11:29:37 GMT
Message-ID: <7ta32r$q98$1@nnrp1.deja.com>


I'm trying to load into an Oracle database some data I've exported from another database. Some of the fields to be loaded are character fields containing '\n' (return) characters. Each '\n' character is escaped with a '\' character. The data is of variable length, separated with a '|' delimiter. When I try to load it with sql-loader, sql-loader treats the '\n' as the end of the record, and tries to read the rest of the record as the next record, which of course fails. I've tried using a CONTINUEIF clause on the '\' character, and while this works, it concatinates the lines together, and I lose the '\n' characters which are part of the text.
Attached below is the control file for sql-loader and a sample record. If anyone has any suggestions on how I can get this to work, I'd be most greatful.

Thanks,

Adi.

LOAD DATA
INTO TABLE I_MAIL_TEMPLATE
REPLACE

(ID             INTEGER EXTERNAL        TERMINATED BY '|',
        NAME            CHAR                    TERMINATED BY '|',
        TEMPLATE        CHAR(700)               TERMINATED BY '|'
)

1|Voyager Project Template|\
Bug description\

========================\

\
\
\
\
\

Bug fix description\
========================\

\
\
\
\
\
\

Test which detects the bug:\
\

Bug detected by (eng. name):|

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Oct 04 1999 - 06:29:37 CDT

Original text of this message

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