Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Strange RTRIM Function behaviour
.. 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
SQL> select rtrim(a.name, ', The')
2 from (select 'Wharf TheatrX, The' as name from dual) a;
RTRIM(A.NAME,
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
![]() |
![]() |