SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to split values from one column into rows
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mkalisz
Starting Member

1 Posts

Posted - 12/26/2006 :  11:39:07  Show Profile  Reply with Quote
Hi,

How can write a select statement where a list of values (separated with commas) from one column of the same record would result in a distinct row for each value of that column (and all other columns duplicated with the same info of course)?

Thanks!

MohammedU
Posting Yak Master

USA
145 Posts

Posted - 12/26/2006 :  15:49:59  Show Profile  Reply with Quote
You can write a function....
Check the following... http://searchvb.techtarget.com/tip/0,289483,sid8_gci932171,00.html


MohammedU
Go to Top of Page

afrika
Flowing Fount of Yak Knowledge

Nigeria
2706 Posts

Posted - 12/26/2006 :  16:06:15  Show Profile  Reply with Quote
This appears to be a popular question
see this
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50648
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=best,split,function
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30188 Posts

Posted - 12/31/2006 :  07:40:16  Show Profile  Visit SwePeso's Homepage  Reply with Quote
Most often because people do not know how to normalize their tables.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22754 Posts

Posted - 12/31/2006 :  23:52:01  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
quote:
Originally posted by Peso

Most often because people do not know how to normalize their tables.


Peter Larsson
Helsingborg, Sweden


Becuase they want more complicated code

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000