Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> loading data with '\n' using sql-loader
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\
========================\
========================\
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Oct 04 1999 - 06:29:37 CDT
![]() |
![]() |