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:
01387021
Views:
56
>>>Can you post your statement, so I can help?
>>>
>>>BTW, I mistyped. It's Object_ID. My son who was standing near by told me, but I already switched to my gmail and didn't re-check as usual my message.
>>
>>You were so eager to get your stars that you didn't have to read my message :). My SQL Select is very long and I am not sure how it would help. This statement works very well against VFP data but now I am testing it against SQL Server and get this error. I am thinking that maybe SQL Server wants the statement to have ORDER BY first and then GROUP BY. I will test it now.
>
>Dmitry,
>
>As I said, don't use the field alias in your group by, use the actual field name. The GROUP BY should come before ORDER BY but let me double check to be sure.
>
>This works
>
>select FirstName as fna, LastName as las from AdminInfo group by FirstName, LastName ORDER BY FirstName

Thank you, Naomi. It works now.
"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