February 25, 2005 at 12:25 pm
If I try removing the Max I get the following error:
Column 'Orders.OrderDate' is invalid in the HAVING clause because it is not contained in either an aggregate function or the GROUP BY clause.
If I add Orders.OrderDate in the select query I get the same error twice one for slect list and other for having list and if I use Max in the select list I get the above error.
February 25, 2005 at 12:27 pm
manojkanoi, I just posted the answer in a different thread that you started:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=164127
* Noel
February 25, 2005 at 12:32 pm
Hi Noeld,
when i try using the your query it gives me this error
Server: Msg 156, Level 15, State 1, Line 8
Incorrect syntax near the keyword 'GROUP'.
February 25, 2005 at 12:34 pm
It was just a missing parenthesis, sorry. Look again
* Noel
February 25, 2005 at 1:18 pm
Thanks that fixed the problem.
Viewing 5 posts - 31 through 34 (of 34 total)
You must be logged in to reply to this topic. Login to reply