Gianluca Sartori (7/14/2010)
I first thought of a CLR aggregate because I was thinking about the second part of the problem (aggregating the split tokens).
Oh right, I see. That makes sense to me now.
Luckily, the function can do the splitting and re-forming very efficiently per-row, so you don't get the huge overhead (memory-wise) of splitting the whole thing and then concatenating.
Paul
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi