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: Jeremy <jeremy0505_at_gmail.com>
Date: Mon, 6 Feb 2006 14:00:37 -0000
Message-ID: <MPG.1e5166dc680c48b998a0e2@news.individual.net>


In article <pfk7u1pti7cg82d0fpoueq49382m6bb79q_at_4ax.com>, Andy Hassall says...
> On Fri, 3 Feb 2006 14:58:18 -0000, Jeremy <jeremy0505_at_gmail.com> wrote:
>
> >I am not familiar with TRANSLATE (I know it's not new but I
> >never found the need to use until now (?))
> >
> >So to get from:
> >'the cat sat on the mat'
> >to
> >'the cat sat on the mat'
> >
> >using a TRANSLATE statement would be?
>
> ... impossible, I think, since translate does simple single-character
> transliterations, whereas the OP wants pairs of spaces turned into single
> spaces.
>
>

The OP was me. I illustratd with a simple loop to replace all ' ' with ' ' and asked if it there was a simpler way of doing it.

Daniel stated:

"On the other hand one could TRANSLATE(somevalue_or_column, 'A ', 'A' and have no procedural code at all."

Daniel if you are reading - was it us who have misunderstood the power of TRANSLATE or you who misunderstood the original question? Either answer is acceptable!

-- 

jeremy
Received on Mon Feb 06 2006 - 08:00:37 CST

Original text of this message

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