Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Remove trailing spaces from a string.
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:
Thanks,
Ashish
Received on Mon Sep 11 2006 - 10:26:35 CDT
![]() |
![]() |