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: Ashish <srivastava.ashish_at_gmail.com>
Date: 11 Sep 2006 09:05:23 -0700
Message-ID: <1157990723.229371.222600@q16g2000cwq.googlegroups.com>

G Quesnel wrote:
> 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

Hi,
Thanks a lot for your suggestion. The additional space was because of a horizontal tab (ascii(9)).

Thanks again
Ashish Received on Mon Sep 11 2006 - 11:05:23 CDT

Original text of this message

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