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 |
GoodFella3993
Starting Member
8 Posts |
Posted - 2010-10-06 : 09:13:32
|
I have the following Table 1 | 2001,2002,2003 | ABC2 | 2003,2004,2005 | DEF3 | 1999,2000,2001 | HIGI need to break up the 3rd column so that there is only one year for each row which will in tern create additional rows. It should look like this:1 | 2001 | ABC1 | 2002 | ABC1 | 2003 | ABC2 | 2003 | DEF2 | 2004 | DEF2 | 2005 | DEF3 | 1999 | HIG3 | 2000 | HIG3 | 2001 | HIGAny idea? The year column may one different amount of years in the original data set. |
|
Shilpa22
Starting Member
37 Posts |
Posted - 2010-10-06 : 09:21:32
|
Split the Year Column(CSV). You will have to write a user defined function for that and insert the values in the table.Thanks in AdvanceShilpa |
 |
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
|
|
|
|