Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-01-20 : 08:15:58
|
| max writes "Im trying to calculate the difference between two columns. The statement im using is:Select course_name, sum(no_players-players_booked) as no from TEE_TIMESWhen I try this statement I get the error message:Error Type:Microsoft OLE DB Provider for SQL Server (0x80040E14)Column 'tee_times_for_sale.ID' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause./golf/csadmin/no.asp, line 14How can I accomplish this?Thanks for any help" |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2003-01-20 : 08:19:10
|
| Your error message does not match your query.Your query will not compile without a GROUP BY clause to accompany your aggregate ... (group by course_name).Jay White{0} |
 |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-01-20 : 08:23:23
|
| Select course_name, sum(no_players-players_booked) as no from TEE_TIMES GROUP BY course_nameOS |
 |
|
|
|
|
|