Hi Jeff,
thanks for this article.
A solution to this problem is to use procedural code (at least for SQL2K).
Probably not the intention of the author... 😀
Thanks for the feedback and the code, Christian. Heh, yeah, as you can see, the WHILE loop is much, much faster in this case... using triangular joins would cause a run that you'd probably cancel after 20 minutes...
I'll be sure to include some "timings" in the upcoming article(s).
--Jeff Moden
Change is inevitable... Change for the better is not.