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: PL/SQL Question

Re: PL/SQL Question

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 22 Jun 1998 20:31:54 GMT
Message-ID: <3595bf1d.30194407@192.86.155.100>


A copy of this was sent to dolans_at_stripe.Colorado.EDU (Sean Dolan) (if that email address didn't require changing) On 22 Jun 98 18:21:56 GMT, you wrote:

> I am trying to replace the ASCII carriage return (chr(13)) with '<br><br>'. I have tried to use the following code but it won;t work:
> select translate (lp,chr(13),
> breaker)into lp
> from dual;
>
>where
> breaker := '<br><br>';
>
>How do you replace/translate a string where you replace one character with many?

use replace( lp, chr(13), breaker )

translate works character by character, replace works on strings.

>I have tried to put the <br><br> string in for breaker but it replaces char(13) with the < symbol - again a problem with replacing 1 character with many.
>
>Thanks,
>Sean
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Jun 22 1998 - 15:31:54 CDT

Original text of this message

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