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

Remove trailing spaces from a string.

From: Ashish <srivastava.ashish_at_gmail.com>
Date: 11 Sep 2006 08:26:35 -0700
Message-ID: <1157988395.569757.222790@e3g2000cwe.googlegroups.com>


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:26:35 CDT

Original text of this message

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