Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Escape sequences in SQL*Loader
Morten Myrvold wrote:
>
> Hi all,
> I'm using SQL*Loader to load our database tables from text files. Some of
> these columns contain text with CR's embedded. My question is: how do I
> specify a CR (carriage return) in my SQL*Loader data file??? As far as I can
> tell, each row in the text file corresponds to exactly one row in the
> database table (so inserting a "real" carriage return is not the solution).
> I've tried to use the commonly-used escape character '\' (backslash) and the
> hex-code for linefeed (0x0A). However, it doesn't seem that SQL*Loader
> treats my backslash as an escape character??? I also tried the C syntax '\n'
> with no luck...
> In SQL*Plus, I discovered that there's an ESCAPE option (which by the way is
> default OFF on my system).
> SET ESCAPE ON results in SQL*Plus seemingly ignoring all my backslashes in
> INSERTs (except of course when I double-backslash - a single backslash is
> produced). I'd like to think that there's a similar option for use with
> SQL*Loader that I have to enable for it to accept my newlines. Is this the
> casae? If so, how do I enable it? I'm not able to find any info on this
> subject...
>
> Regards,
> Morten Myrvold
> Sysdeco Profdoc AS, Kongsberg, NORWAY
I understand your problem. Whenever SQL*Loader encounters a CR it thinks this is the beginning of a new record. I've had to manually, or thru the use of awk, join logical lines together. Even the optionally enclosed clause doesn't work.
Let me know if you find a better solution. Leng. Received on Wed Dec 03 1997 - 00:00:00 CST
![]() |
![]() |