![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 |
#5
| |||
| |||
|
|
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 |
#6
| |||
| |||
|
|
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 |
#7
| |||
| |||
|
|
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 |
#8
| |||
| |||
|
|
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 |
#9
| |||
| |||
|
|
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 |
#10
| |||
| |||
|
|
Alex Why does this require a stored procedure and where's the pivot? -- Thank you for following up. |
![]() |
| Thread Tools | |
| Display Modes | |
| |