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 > Re: splitting a...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 6871 of 7280
Post > Topic >>

Re: splitting a string into columns

by DA Morgan <damorgan@[EMAIL PROTECTED] > May 1, 2008 at 06:21 PM

kes wrote:
> 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

Why does this require a stored procedure and where's the pivot?
-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Wa****ngton
damorgan@[EMAIL PROTECTED]
 (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
 




 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
tan12V112 Wed Dec 3 0:12:35 CST 2008.