Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: rtrim problem
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
![]() |
![]() |