Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: String - replacing multiple spaces
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
![]() |
![]() |