Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > splitting a str...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 6871 of 6987
Post > Topic >>

splitting a string into columns

by kes <abirch@[EMAIL PROTECTED] > May 1, 2008 at 04:55 PM

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 Posts in Topic:
splitting a string into columns
kes <abirch@[EMAIL PRO  2008-05-01 16:55:48 
Re: splitting a string into columns
DA Morgan <damorgan@[E  2008-05-01 18:21:34 
Re: splitting a string into columns
Ed Prochak <edprochak@  2008-05-02 05:19:04 
Re: splitting a string into columns
Walt <walt_askier@[EMA  2008-05-02 09:55:46 
Re: splitting a string into columns
kes <abirch@[EMAIL PRO  2008-05-02 08:18:02 
Re: splitting a string into columns
joel garry <joel-garry  2008-05-02 13:28:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sat Jul 5 5:33:49 CDT 2008.