• da-zero (9/6/2010)


    tommyh (9/6/2010)


    Hugo Kornelis (9/6/2010)


    Good question!

    In addition to your explanation, here is WHY an alias can be used in the ORDER BY, but not in the GORUP BY:

    Because Microsoft havent implemented it.

    We are allowed to use aliases in Group by (and other stuff) in the form of table aliases. Therefore there is no real reason for not allowing column aliases as well (well maybe a bit of performance).

    And who is we?

    Hrmm having a hard time deciding if that is supposed to be sarcastic or not. But anyway.

    I used "we" to represent everyone using SQL. Honestly dont know how else i could have written that.