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