GilaMonster (10/1/2012)
I wouldn't use that function. The loops will make it very slow.Try this one: http://www.sqlservercentral.com/articles/Tally+Table/72993/
I hate loops as well, but it will be ok if used for splitting a single list of values. Actually, properly written loop splitter will outperform Jeff Moden tally-table based split for a single list, however, if you need to use the split function for a set of rows, you better use mentioned Jeff's one.