• My final comment in this topic, and then I'll respect R.P.'s request.

    Jeff Moden (7/19/2010)


    Still, the order of run return is, in fact, documented in Books Online...

    ROLLUP

    Specifies that in addition to the usual rows provided by GROUP BY, summary rows are introduced into the result set. [font="Arial Black"]Groups are summarized in a hierarchical order[/font], from the lowest level in the group to the highest. [font="Arial Black"]The group hierarchy is determined by the order in which the grouping columns are specified. [/font]Changing the order of the grouping columns can affect the number of rows produced in the result set.

    This quote describes which possible summary rows are and are not introduced in the result set, not the order in which results are returned.

    (I'm also tempted to point out the use of the term "result set" rather than "recordset" in this quote, but the terminology in BOL as a whole is so often wrong that I'd probably better not go there)

    Jeff, or anyone else - if you want to continue this debate, then please start a new topic and send me a PM with the link, or include the link in this topic. Without a link, I'll probably never find the new topic.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/