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: Removing space padding from INSIDE a string?

Re: Removing space padding from INSIDE a string?

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 19 Oct 2005 10:29:46 -0700
Message-ID: <1129742986.778038.34100@z14g2000cwz.googlegroups.com>

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



partnumber3

Regards
/Rauf Received on Wed Oct 19 2005 - 12:29:46 CDT

Original text of this message

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