• Jeff Moden (9/2/2013)


    Same goes for another atypical method (the "Multi-Pass" update) that a chap by the name of "Hugo" wrote.

    I assume that you mean set-based iteration. That is by no means an atypical method, but one a good SQL programmer should master.

    Of course, for this particular problem, the correct solution is an ordered aggregate. No that is not possible on SQL 2008, but it's reasonable to assume that a class would teach from the most recent version. At least if the features are ANSI-compatible.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]