Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: how to substr '%' from the data?
By
using the instr function. Here is an example. N.B.,
the space between the words "and" and "seven" is
returned.
select substr('Four score and seven years
ago',1, instr('Four score and seven years ago', 'seven')
-1) from dual
<FONT face=Arial color=#0000ff
size=2>SUBSTR('FOURSCO---------------Four score and
Ian
MacGregor
<FONT face=Arial color=#0000ff
size=2>Stanford Linear Accelerator Center
<A
href="mailto:ian_at_slac.stanford.edu">ian_at_slac.stanford.edu
<FONT
size=2><FONT face=Arial
color=#0000ff>
<FONT
size=2>
<FONT
size=2> -----Original
Message-----From: Helen rwulfjeq
[mailto:lannyue_at_yahoo.com]Sent: Monday, June 11, 2001 4:07
PMTo: Multiple recipients of list ORACLE-LSubject: how
to substr '%' from the data?
Hello,
I have data like following, how do I substr the string (or use any other
function) to get until "%" and return without "%":
*************************************<FONTface=Courier>
RC-SF-DAL-nd-% AD-LE-%-%-% RC-DD-LKF-01-RENTAL% CS-%-%-%-% CS-%-ABC-%-% *************************************
Do You Yahoo!?<A
href="http://personal.mail.yahoo.com/?.refer=mailiyfoot">Yahoo! Mail Personal
Address - Get email at your own domain with Yahoo! Mail.
Received on Mon Jun 11 2001 - 17:29:57 CDT