Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Strange RTRIM Function behaviour

Re: Strange RTRIM Function behaviour

From: George Ferenc <georgef_at_lonelyplanet.com.au>
Date: Fri, 18 Aug 2000 11:23:20 +1000
Message-ID: <8ni36a$gf7$1@perki.connect.com.au>

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

Original text of this message

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