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: rtrim problem

Re: rtrim problem

From: Stephan Born <stephan.born_at_beusen.de>
Date: Fri, 05 Nov 1999 10:52:12 +0100
Message-ID: <3822A8CC.83574C2A@beusen.de>

Dragan Pavljuk schrieb:

> I have two select. One is : select rtrim('Colgate Total 100ml
> tuba','00ml tuba') from dual
>
> and another is : select rtrim('Colgate Total 100ml
> tuba','100ml tuba') from dual
>
> First select return : 'Colgate Total 1'
>
> and second : 'Colgate To'
>
> Is this Ok ?
>

Yes, this is exactely what rtrim is supposed to do.

rtrim does not trim the 'string' from the right side but 'each character' which appears in the given set.

in the first example the character '1' is the first one which does not appear in the filter-set
in the second example the '1' is trimmed, too, so the 'o' is the first character which does not appear in the filter-set....

>
> Belive or not it is.
> But how can I cut '100ml tuba' from 'Colgate Total 100ml tuba' with rtrim
> command (I don't want to use substr)?

I think you have to use substr....

Regards, Stephan

--


Dipl.-Inf. (FH) Stephan Born   | beusen Consulting GmbH
fon: +49 30 549932-17          | Landsberger Allee 392
fax: +49 30 549932-29          | 12681 Berlin
mailto:stephan.born_at_beusen.de  | Germany
---------------------------------------------------------------
       PGP-Key verfügbar       |      PGP-Key available
---------------------------------------------------------------


Received on Fri Nov 05 1999 - 03:52:12 CST

Original text of this message

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