Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to split values from one column into rows

Author  Topic 

mkalisz
Starting Member

1 Post

Posted - 2006-12-26 : 11:39:07
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

145 Posts

Posted - 2006-12-26 : 15:49:59
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
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-12-26 : 16:06:15
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

30421 Posts

Posted - 2006-12-31 : 07:40:16
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

22864 Posts

Posted - 2006-12-31 : 23:52:01
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
   

- Advertisement -