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.
| Author |
Topic |
|
infodemers
Posting Yak Master
183 Posts |
Posted - 2011-02-25 : 13:33:21
|
| Hi from a result like thisNum Code Start Date End Date204-201 ABCDF 2004-04-04 NULL204-203 ABCDF 2004-07-18 NULL204-205 QWERT,ASDFG 2005-12-05 NULL204-206 YUIOP,GHJKL 2006-05-11 NULLI wish to get this :Num Code Start Date End Date204-201 ABCDF 2004-04-04 NULL204-203 ABCDF 2004-07-18 NULL204-205 QWERT 2005-12-05 NULL204-205 ASDFG 2005-12-05 NULL204-206 YUIOP 2006-05-11 NULL204-206 GHJKL 2006-05-11 NULLThe column that sometimes has coma seperated values are then split to creat another record with same Num, Start Date and End Date. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-02-25 : 13:42:32
|
| This might help: http://www.sqlteam.com/article/parsing-csv-values-into-multiple-rows |
 |
|
|
infodemers
Posting Yak Master
183 Posts |
Posted - 2011-02-25 : 17:05:21
|
| Thanks a lot robvolk!It worked just like I wished! |
 |
|
|
|
|
|