Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Strange RTRIM Function behaviour
Thankx,
Oracle Docs are not very clear on this. I was under impression that RTRIM willl match the complete string at the end.
What I ended up doing is this
select NVL(SUBSTR('Wharf Theatre, The', 1, INSTR('Wharf Theatre, The', ',
The') - 1), 'Wharf Theatre, The')
from dual;
This gives me the functionality that I required (namely drop the trailing ', The' from any name or display the name unchanged if it does not end with ', The')
Thanx for your help,
George Received on Thu Aug 17 2000 - 20:23:20 CDT