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: Remove trailing spaces from a string.

Re: Remove trailing spaces from a string.

From: <lisaashleyrafter_at_yahoo.com>
Date: 11 Sep 2006 08:28:53 -0700
Message-ID: <1157988533.123910.122030@i42g2000cwa.googlegroups.com>


You want to remove the trailing spaces? or ALL intermediate whitespace?

Ashish wrote:
> Hi,
>
> I need to remove trailing spaces from my data. But trim() dosent seem
> to work.
> For example, the query results in the below o/p :
>
> select '^'||trim(ref_part_nbr)||'^' from nrconfig_item_masters
>
> ^113A Vert - MHT - PWL/R - FPMB - 6.50 - Base Plates
> ^
> ^113A Vert - MHT - PWL/R - FPMB - 6.50 - Rails and Blocks
> ^
> ^113A Vert - MHT - PWL/R - FPMB - 7.00 - Base Plates
> ^
> ^113A Vert - MHT - PWL/R - FPMB - 7.00 - Rails and Blocks
> ^
> ^113A Vert - MHT - PWL/R - FPMB - 7.50 - Base Plates
> ^
> ^113A Vert - MHT - PWL/R - FPMB - 7.50 - Rails and Blocks
> ^
> ^113A Vert - MHT - PWL/R - FPMB - 8.00 - Base Plates
> ^
> ^113A Vert - MHT - PWL/R - FPMB - 8.00 - Rails and Blocks
> ^
>
> Ref_part_nbr is a VARCHAR2(1000) column.
> The data has probably been inserted into the tables by copy-pasting
> from excel.
> How can i remove the trailing spaces?
>
> DB Version Info:
> -----------------------
> Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
> PL/SQL Release 9.2.0.6.0 - Production
>
> Thanks,
> Ashish
Received on Mon Sep 11 2006 - 10:28:53 CDT

Original text of this message

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