Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is GROUP_ID reserved word?
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01387014
Message ID:
01387015
Vues:
67
>Hi,
>
>When executing a long SQL Select command I get error "Invalid column name 'GROUP_ID'". I do have the very first column of the SQL Select defined as "MYFIELD AS GROUP_ID" and then I have GROUP BY GROUP_ID at the end of the SQL Select.
>
>Is GROUP_ID a reserved word?

No, AFAIK, but you can not ORDER BY the new field. You should ORDER BY the original field, e.g.
select myField as Group_ID from myTable ORDER BY myField
Obect_ID is a SQL Server function.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform