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 -> Parsing A String and Inserting

Parsing A String and Inserting

From: E. Scott <scott.ray_at_sunlife.com>
Date: 14 Mar 2005 11:00:57 -0800
Message-ID: <48618db6.0503141100.5b59b99@posting.google.com>


I have a small table that looks like the following:

TEST_TABLE_1 TXN_ID NUM(9)
STRINGFIELD VARCHAR2(90) If TXN_ID is 123 and STRINGFIELD is 333.444.5555.666.

I need a procedure or function that will parse this string and insert rows in another table like this:

TEST_TABLE_2 TXN_ID SEQ_NUM NEW_STRING

123        1      333
123        2      444
123        3      5555
123        4      666

I know the INSTR Function can be used in some kind of loop but I am not sure what combination of functions to use to know when end of string is hit or best method for optimization. Could be large volume of rows.

Any help appreciated.

Scott Received on Mon Mar 14 2005 - 13:00:57 CST

Original text of this message

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