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