I'm working with Oracle 10g R2
create table table1(
table1_id number,
csv1 varchar2(100),
csv2 varchar2(100));
insert into table1 values(1, 'a,b,c', 'w,x,y,z');
insert into table1 values(2, 'a,b,c,d', 'x,y,z');
select * from table1;
"TABLE1_ID","CSV1","CSV2"
"1","a,b,c","w,x,y,z"
"2","a,b,c,d","x,y,z"
I would like to see it like
1, a, b, c, , w, x, y, z
2, a, b, c, d, , x, y z
Should I create a store procedure that will split the strings into
different rows, then pivot them? Are there any good articles to point
to a better way? Any suggestions will be welcomed.
Alex


|