-----Original Message-----
From: Feighery Raymond [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 27, 2004 9:29 AM
To: Multiple recipients of list ORACLE-L
Subject: RE: String manipulationselectsubstr(subject,1,instr(subject,'~')-1) first,substr(subject,instr(subject,'~')+1, instr(subject,'~',1,2)-(instr(subject,'~'))-1) second,substr(subject,instr(subject,'~',1,2)+1,length(subject)) thirdfrom test_tablewhere test_column=1700455/Ray-----Original Message-----
From: Stefick Ronald S Contr ESC/HRIDA [mailto:[EMAIL PROTECTED]
Sent: Monday, January 26, 2004 11:29 PM
To: Multiple recipients of list ORACLE-L
Subject: String manipulationI'm trying to separate a string into 3 values:
The string is:
mystr1~mystr2~mystr3Here is the code so far:
1 select substr(subject,1,instr(subject,'~')-1) first,
2 substr(subject,instr(subject,'~')+1, instr(subject,'~',1,2)-1) second,
3 substr(subject,instr(subject,'~',1,2)+1,length(subject))
4 from test_table
5 where test_column=1700455The result I get is:
mystr1
mystr2~mystr3
mystr3The result I want is:
mystr1
mystr2
Mystr3TIA,
Scott Stefick
MILPDS OCP Oracle DBA
[EMAIL PROTECTED]
210-565-2540
___________________________________________________________________________
This email and any attached to it are confidential and intended only for the individual or entity to which it is addressed. If you are not the intended recipient, please let us know by telephoning or emailing the sender. You should also delete the email and any attachment from your systems and should not copy the email or any attachment or disclose their content to any other person or entity. The views expressed here are not necessarily those of Churchill Insurance Group plc or its affiliates or subsidiaries. Thank you.
Churchill Insurance Group plc. Company Registration Number - 2280426. England.
Registered Office: Churchill Court, Westmoreland Road, Bromley, Kent BR1 1DP.
Title: String manipulation
I
wrote a PL/SQL package with functions you can use for this. Find it
at http://www.smdi.com/employee/johnf/list.pks
and http://www.smdi.com/employee/johnf/list.pkb.
I wrote it so that only the first call parses the string. Subsequent
calls use the already parsed pieces.
- String manipulation Stefick Ronald S Contr ESC/HRIDA
- RE: String manipulation SRIDHARAN, SAN (SBCSI)
- Re: String manipulation Jared . Still
- RE: String manipulation Nikhil Khimani
- Re: String manipulation Mladen Gogala
- RE: String manipulation Feighery Raymond
- John Flack