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: fumi <fumi_at_tpts5.seed.net.tw>
Date: 5 Nov 1999 01:53:12 GMT
Message-ID: <7vtda8$6j4$5@news.seed.net.tw>

Dragan Pavljuk <dpavljuk_at_spidernet.com.cy> wrote in message news:3821e4fc.0_at_news.spidernet.net...
> 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. It is the purpose of RTRIM() function.

> 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)?

Use REPLACE() function.

SQLWKS> select rtrim(replace('Colgate Total 100ml tuba','100ml tuba', '')) from dual; RTRIM(REPLACE



Colgate Total
1 row selected. Received on Thu Nov 04 1999 - 19:53:12 CST

Original text of this message

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