Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: rtrim problem
Just for the sake of argument, I did figure out
a way to do this... but I think it will work
only on the exact phrase...
Using Only RTrim, here is the solution:
select '>'||
rtrim(
rtrim(
rtrim('Colgate Total 100ml tuba', 'Colgate Tt0mub'),
The angle brackets only outline the text.
Explanation:
RTRIM(char,set) is defined as follows:
"char, with final characters removed
after the last character NOT in set.
set defaults to ' '".
Sql Quick Reference [my emphasis added]
Therefore:
a. The inner Rtrim trims up to the 1.
>Colgate Total 1<
b. The next outer one Trims off the one
by "not including" blank.
>Colgate Total <
c. The last one Rtrims the blank.
>Colgate Total<
Robert Proffitt
Beckman Coulter
Brea California
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Nov 05 1999 - 11:35:37 CST