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: Simple SQL question

Re: Simple SQL question

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Wed, 1 Feb 2006 06:26:16 +0100
Message-ID: <43e04677$0$25716$636a15ce@news.free.fr>

"Andy Hassall" <andy_at_andyh.co.uk> a écrit dans le message de news: 7ivvt1998ncc2f7q49r2s6lnc2inqr2l8n_at_4ax.com...
| On Tue, 31 Jan 2006 15:27:28 -0800, DA Morgan <damorgan_at_psoug.org> wrote:
|
| >Mahesh Rajendran wrote:
| >>>>The problem with this approach is you may not know how many layers of
| >>>>replace you need.
| >>
| >> Agreed. And it will not work if there is leading space~!.
| >> Thanks
| >
| >Why is this discussion continuing? Translate will work in all
| >situations and is faster.
|
| TRANSLATE doesn't give the result the poster asked for.
|
| SQL> select translate('the cat sat on the mat', 'A ', 'A')
| 2 from dual;
|
| TRANSLATE('THECAT
| -----------------
| thecatsatonthemat
|
| --
| Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
| http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

I also wander why this discussion goes on as the Ask Tom thread i posted (http://asktom.oracle.com/pls/ask/f?p=4950:61:15900582171083902697:::::) titled "Replacing Multiple Blanks by single blanks in text" explored this question since 24-Nov-2003 and, imo, i don't see another solution in pre-10g version that those already posted there.

Regards
Michel Cadot Received on Tue Jan 31 2006 - 23:26:16 CST

Original text of this message

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