0

I'm need to separate out this table as follows:

enter image description here

I've heard this may be possible using a CURSOR function? Can anyone help please?

Select id, tag from mytable
Mike
  • 537
  • 1
  • 8
  • 18
  • 1
    If you are going to split strings in tsql DO NOT use a cursor or any form of a loop. There are plenty of other options that will not cripple the performance of your system. Here are some of those methods. http://sqlperformance.com/2012/07/t-sql-queries/split-strings – Sean Lange Jun 25 '15 at 13:23
  • 2
    This is a duplicate of so many questions, I have just chosen the one with the highest votes to use to close this. I don't advocate the accepted answer though, and would suggest using [this answer](http://stackoverflow.com/a/19935646/1048425) – GarethD Jun 25 '15 at 13:24

0 Answers0