Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interview questions
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01380550
Message ID:
01401816
Views:
61
>I don't know exactly WHY, I just know that you should not use it.
>
>Here was a question, BTW, may be you can explain
>
>message #1387014

>
>It's not an issue of the phrase "GROUP_ID" per se...you CAN'T use an expression alias in a GROUP BY. Period. You could even try to call it "Fred", and say...
>
>SELECT MyField as Fred, sum(amount) as totamount
> from mytable
> group by Fred

>
>...and it will bomb like Bristol Palin's boyfriend's condom. You have to refer to the original column name (or expression)

I know it will bomb (tried it too), but any scientific explanation behind this behavior?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform