Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interview questions
Message
From
25/05/2009 12:53:54
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01380550
Message ID:
01401813
Views:
64
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform