Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Strange RTRIM Function behaviour

Re: Strange RTRIM Function behaviour

From: Erika Grondzakova <Erika.Grondzakova_at_cern.ch>
Date: Thu, 17 Aug 2000 11:06:15 +0200
Message-ID: <399BAB07.92B2A206@cern.ch>

.. I sent it before the end....

SQL> select rtrim(a.name, ', The')
  2 from (select 'Wharf Theatre, The' as name from dual) a;

RTRIM(A.NAME



Wharf Theatr

SQL> select rtrim(a.name, ', The')
  2 from (select 'Wharf TheatrX, The' as name from dual) a;

RTRIM(A.NAME,



Wharf TheatrX

So all characters are removed that they exists in the set ', The', that means that even last 'e' in the world Theatre exist in this set, so it is removed. (by set is not understand the substring of characters in such a order but any character in a set)

Hth,

Erika

Erika Grondzakova wrote:
>
> Hello George,
>
> According to a little bit confusing definition of the function it is a
> expected behaviour...
>
> George Ferenc wrote:
> >
> > I am running Oracle 8i 8.1.6 on SOlaris 2.7.
> >
> > When running the following statement
> >
> > select rtrim(a.name, ', The')
> > from (select 'Wharf Theatre, The' as name from dual) a;
> >
> > I get 'Wharf Theatr' as a result.
> >
> > Shouldn't I get 'Wharf Theatre'? Is this a bug or expected behaviour?
> >
> > George
Received on Thu Aug 17 2000 - 04:06:15 CDT

Original text of this message

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