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: G Quesnel <dbaguy_ott_at_yahoo.com>
Date: 11 Sep 2006 08:51:20 -0700
Message-ID: <1157989880.544444.291290@m73g2000cwd.googlegroups.com>


I would guess that your issue is not with the space character, but that there is another character (possibly carriage return) at the end of the string. The trim function can be used to remove any character at the end of your string, but it has to be identified, unless you want to remove the default - space. To find out what character you have, you could use something like ...
Select ascii(substr(ref_part_nbr,-1) Last_char, ascii(substr(ref_part_nbr,-2,1) 2nd_last   from nrconfig_item_masters where rownum < 5;

You could then use the TRIM function with the CHR function, if you have a 'special' character to remove. Also, if the character(s) are on all values, you could also do a substr on the column, removing all last character(s) with substr(..., 1, lenght(...)-1)

hth Received on Mon Sep 11 2006 - 10:51:20 CDT

Original text of this message

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