Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: PL/SQL : how to drop all the white characters from a string
Many thanks to all who replied !!!
DBAndrey
-----Original Message-----
Sent: Wednesday, September 05, 2001 3:20 PM
To: ORACLE-L_at_lists.sunysb.edu
Hi,
An example to remove the spaces using the translate function is as follows.
create table test (name varchar2(15));
insert into test values (' abc cdf ');
select * from test;
NAME
update test set name =
translate
(name,'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
','0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ')
select * from test;
NAME
Hope this example illustrates the usage of translate.
Regards,
Raghu
> ----------
> From: Nelson Fernandes[SMTP:nelson.fernandes_at_PATNI.COM]
> Reply To: ORACLE database mailing list.
> Sent: Wednesday, September 05, 2001 4:58 PM
> To: ORACLE-L_at_lists.sunysb.edu
> Subject: Re: PL/SQL : how to drop all the white characters from a
> string
>
> use the TRANSLATE function of PL/SQL to do that
>
>
> ----- Original Message -----
> From: "Andrey Bronfin" <andreyb_at_ELRONTELESOFT.COM>
> To: <ORACLE-L_at_lists.sunysb.edu>
> Sent: Wednesday, September 05, 2001 4:34 PM
> Subject: PL/SQL : how to drop all the white characters from a string
>
>
> > Dear all !
> >
> > I need a PL/SQL proc that will drop all the white characters (spaces ,
> tabs
> > , enters etc.. ) from a string stored in a VARCHAR column
> > I'm not trying to load my work to others , but ... if U have such a
> proc
> > ready , would U please share .
> > Thanks a lot in advance.
> >
> >
> > DBAndrey
> >
> > * 03-9254520
> > * 053-464562
> > * mailto:andreyb_at_elrontelesoft.com
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Andrey Bronfin INET: andreyb_at_elrontelesoft.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Sep 05 2001 - 10:17:52 CDT
![]() |
![]() |