Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Replace unwanted chars in data with a space?

Re: Replace unwanted chars in data with a space?

From: John Russell <johnrussell10_at_home.com>
Date: Wed, 25 Jul 2001 09:58:40 GMT
Message-ID: <9u5tltkf363injsevnd6e4g5ou8s7d18pf@4ax.com>

Someone suggested to me that it was a one-liner to replace each character with its slash-escaped equivalent, e.g. turn 'xyz' into '\x\y\z'. I'm sure this is true in Perl, but is there a simple way to do it in PL/SQL (other than a multitude of replace( ) calls)?

John

On 24 Jul 2001 13:25:14 -0700, Thomas Kyte <tkyte_at_us.oracle.com> wrote:

>tkyte_at_TKYTE901.US.ORACLE.COM> select replace( 'Jordan; Rd.', ';', ' ' ) from
>dual;
>
>REPLACE('JO
>-----------
>Jordan Rd.
>
>works for the single character, to translate a set of characters into a set of
>other characters:
>
>tkyte_at_TKYTE901.US.ORACLE.COM> select translate( 'Jordan; Rd.', ';.', ' ' ) from
>dual;
>
>TRANSLATE('
>-----------
>Jordan Rd
>
>
>make the ' ' as long as the ';.'

--
Got an Oracle database question?
Try the search engine for the database docs at:
http://tahiti.oracle.com/
Received on Wed Jul 25 2001 - 04:58:40 CDT

Original text of this message

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