Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Replace unwanted chars in data with a space?
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
![]() |
![]() |