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: String - replacing multiple spaces

Re: String - replacing multiple spaces

From: Matthias Gresz <GreMa_at_t-online.de>
Date: Tue, 15 Dec 1998 09:04:00 +0100
Message-ID: <367617F0.E285924F@Privat.Post.DE>


Matthias Gresz schrieb:
>
> Jerome Chik schrieb:
> >
> > Hi,
> >
> > Is there a way in PL/SQL to remove multiple spaces in a string and
> > replacing them with a single space?
> >
> > e.g. "Billy Bob Smith" into "Billy Bob Smith"
> >
> > Thanks,
> >
> > Jerome.
>
> Shouldn't it go this way:
>
> UPDATE
> your_table
> SET
> your_field=REPLACE(your_field, ' ', ' ')
> ;

You might have to iterate this until no more rows are processed.

HTH
Matthias
--
Matthias.Gresz_at_Privat.Post.DE

Always log on the bright side of life.
http://www.stone-dead.asn.au/movies/life-of-brian/brian-31.htm Received on Tue Dec 15 1998 - 02:04:00 CST

Original text of this message

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