Not exactly sure what you're after
but possibly the below if you're simply looking to stop before the first
occurence of '%'
select substr('CS-%-ABC-%-%', 1, instr('CS-%-ABC-%-%','%') - 1) from dual;
-----Original Message-----
Sent: 12 June 2001 00:07
To: Multiple recipients of list ORACLE-L
Hello,
I have data like following, how do I substr the string (or use any other
function) to get until "%" and return without "%":
*************************************
RC-SF-DAL-nd-%
AD-LE-%-%-%
RC-DD-LKF-01-RENTAL%
CS-%-%-%-%
CS-%-ABC-%-%
*************************************
I did "select RTRIM('CS-%-%-%-%', '%-%') from DUAL", but it can not return
correct for the last record
eg, "select RTRIM(CS-%-ABC-%-%', '%-%') from DUAL" -- will not work
correctly
Thanks for help
_____
Do You Yahoo!?
Yahoo! Mail <http://personal.mail.yahoo.com/?.refer=mailiyfoot> Personal
Address - Get email at your own domain with Yahoo! Mail.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Nicoll, Iain (Calanais)
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).