Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is GROUP_ID reserved word?
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01387014
Message ID:
01387016
Views:
53
>>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.

I verified that the name of the field is not the problem (I changed it and get the same result). But I am a little confused by what you are saying. I get error on 'GROUP BY" and you are referring to "ORDER BY". What am I missing?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform