Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to make SQLLoader to understand \n as part of string
Hi,
You could use the stream record format, specifying a record seperator.
see http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96652/ch03.htm
for an example.
load data
infile 'example.dat' "str '|\n'"
into table example
fields terminated by ',' optionally enclosed by '"'
(col1 char(5),
col2 char(7))
example.dat:
hello,world,|
james,bond,|
You'll have to adjust your flatfiles to include a specific record seperator tho
...
Works from 8.1.6 and above (if I'm not mistaken)
cheers,
Kurt
At 17:23 24/08/2006 -0400, Mindaugas Navickas wrote:
>Hi,
>
>May be somebody faced this issue before and knows how to solve that.
>
>We have a CSV file where text fields enclosed witrh ("). The issue is that
text
>fields might contain \n (new line - 0x10) character which is treated by
>SQLLoader as record terminator. Is it any way to tell loader that \n when met
>after opening apostropha to be treated as part of field and not as record
>terminator. Here is sample data (note the first line - bbb\nbbbshould be part
>of the same field:
>
>111,"aaaa","bbb
>bbb","ccc"
>222,"xxxx","yyy",
>333,"ffff","ggg","hhhh"
>
>Thank you
>
>Mindaugas Navickas
>OCP DBA
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>--
>http://www.freelists.org/webpage/oracle-l
>
>
-- Kurt Van Meerbeeck kurtvm_at_pandora.be kurt_van_meerbeeck_at_axi.be dude_at_ora600.org http://www.ora600.org Imagination is more important than knowledge... -- http://www.freelists.org/webpage/oracle-lReceived on Thu Aug 24 2006 - 16:49:32 CDT
![]() |
![]() |