SeanF-708538 (9/23/2012)
Jeff,Thank you for the elegant solution I was after.
Intrigued, I added this code into a stored procedure and compared the performance against the existing, the average over 10 runs indicates that Jeff's solution is approximately twice as fast. Nice one!
Thank you
Heh... twice as fast? I'm slipping up in my old age. 😛
Thanks for the feedback, Sean.
--Jeff Moden
Change is inevitable... Change for the better is not.