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 -> Re: How do I replace new line characters in Oracle 8

Re: How do I replace new line characters in Oracle 8

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 03 Nov 1999 08:17:06 -0500
Message-ID: <jDUgOCRCRnUxVHobX0=HqD7wA69t@4ax.com>


A copy of this was sent to Franco Finstad <ffinstad_at_globalsight.com> (if that email address didn't require changing) On Wed, 03 Nov 1999 00:16:33 GMT, you wrote:

>In a SELECT statement, how do I use the replace() function to replace
>new line characters in the record?

chr(10) = Line Feed
chr(13) = Carriage Return

select replace( some_string, chr(13)||chr(10), 'xy' ) from T;

don't know if you have have 13+10 (DOS EOL markers) or just 10's (Unix EOL markers), adjust appropriately....

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Nov 03 1999 - 07:17:06 CST

Original text of this message

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