Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Removing space padding from INSIDE a string?
scholzie wrote:
> My company's database has a field where a part number is. It's supposed
> to be an unbroken string (with no spaces), but the auto-loading
> software is putting spaces in. Example: 'par tnu mber 3' where I really
> want the value 'partnumber3'
>
> I've tried to use trim(' ' from part), but that only takes care of left
> and right padding. How can I remove all the spaces from inside a
> string?
>
> TIA
Try replace function,
SQL> select replace('par tnu mber 3', ' ', '') replaced from dual;
REPLACED
Regards
/Rauf
Received on Wed Oct 19 2005 - 12:29:46 CDT
![]() |
![]() |