Jeff Moden (7/20/2010)
Please see the following "how to" article for a T-SQL only solution...
Yes, that's one of the top articles on the whole site. For some reason, I can never remember the title when I think about searching for it. That's my excuse for not posting it previously, and I am sticking to it 🙂
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi