I have a table that contains a column with comma separated values. I need to separate those values into new rows. Table looks like this :
ID| DATE|Value|Feed|
1|10-10-2014|5.00 |1,3,4
2|10-11-2014|21.00|1
54|01-15-2015|8.24 |2,15
1|02-22-2015|5.14 |1,3,4
And I need to break it out to :
ID| DATE|Value|Feed|
1|10-10-2014|5.00 |1
1|10-10-2014|5.00 |3
1|10-10-2014|5.00 |4
2|10-11-2014|21.00|1
54|01-15-2015|8.24 |2
54|01-15-2015|8.24 |15
1|02-22-2015|5.14 |1
1|02-22-2015|5.14 |3
1|02-22-2015|5.14 |4
So I believe I need a to write a table valued function but I'm having a difficult time figuring out where to start.
Any guidance would be great.
Thanks.