Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interview questions
Message
 
 
À
25/05/2009 12:53:54
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01380550
Message ID:
01401816
Vues:
60
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform