• Both functions will result in a sort unless a) the data coming into the operator is sorted same as the order by of the function and b) the query processor can determine that this is the case. As Luis said "it depends". Run your queries and check the plans.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]