Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: carriage return / line feed's in text or varchar fields
> Hi,
>
> I am writing some scripts which have to update data in an Oracle 8.1.6
> database.
>
> The update commands are send by sqlplus
> But I am unable to update text or varchar fields when the string
> contains carriage return / line feed characters, because the CRLF's get
> interpreted as part of the SQL statement (sp2-0734) instead of part of
> the character string to be inserted. How do I get CRLF's into a text or
> varchar field in Oracle?
>
> Thanks,
> Andreas
>
>
> i.e.:
>
> UPDATE contact SET field1='Hi,
>
> this is an update to test CR
>
> Greetings' WHERE ckey=4711;
update
contact
set
field1 = 'Hi,' || chr(13) || chr(10) || 'test'
where
ckey = 4711;
hth
Rene Nyffenegger
-- Projektleitung und Entwicklung in Oracle/C++/C# Projekten http://www.adp-gmbh.ch/cv.htmlReceived on Sat Mar 08 2003 - 13:42:02 CST