Check out this blog that discusses the SQL Iterators, and suggests a further look at the CLR versions out on Codeplex. I’ve always liked these; I have used however, and the results that I got were not as expected. It’s a good idea, I think, to take a look at what’s happening in SQL Profiler as a check. I think once I tried to update statistics but it wasn’t working underneath. Probably something that I did wrong :)
Lee Everest
----------------------
http://blogs.msdn.com/b/bobtaylor/archive/2011/05/02/sql-iterators-making-the-life-of-a-sql-server-dba-that-much-easier.aspx