Question : seperate string from a column add multiple rows

I have a table  'stage'  with following columns
code, desc, rule
I am not concerned about desc.
I have data as follows

code    desc     rule
2233    test1      99/100, 33/222, 44/555

What I would like  to see in select statement as follows

code   desc   rule              r1      r2    
2233   test1    99/100        99    100
2233   test1   33/222        33      222
2233   test1    44/555       44      555

Thanks

Answer : seperate string from a column add multiple rows

First you need to convert the CSV to a list of rows.  Then it's a simple matter to call SUBSTR with INSTR to extract the '/' seperated into two columns.

Check out the XML approach for CSV to rows at:
The section titled: xml solution
http://www.oracle-developer.net/display.php?id=412
Random Solutions  
 
programming4us programming4us