thechazm
VBA, VB.net, C#, Java
- Local time
- Today, 04:49
- Joined
- Mar 7, 2011
- Messages
- 515
I am having a problem getting the sum in this query. It keeps giving me an error message (You tried to execute a query that does not include the specified expression "ID" as part of an aggregate function. (Error 3122)).
Can someone please shed some light on this for me because I have done plenty of calculations without this error before... Below is my SQL. Thank you!
Can someone please shed some light on this for me because I have done plenty of calculations without this error before... Below is my SQL. Thank you!
Code:
SELECT [ZoneManagers Request].ID,
[ZoneManagers Request Full Week].Week1R,
[ZoneManagers Request Half Week].Week1R,
Sum([ZoneManagers Request Full Week].[Week1R]+([ZoneManagers Request Half Week].[Week1R]/2)) AS TotalWeek1
FROM ([ZoneManagers Request]
LEFT JOIN [ZoneManagers Request Full Week] ON [ZoneManagers Request].ID = [ZoneManagers Request Full Week].[Request ID])
LEFT JOIN [ZoneManagers Request Half Week] ON [ZoneManagers Request].ID = [ZoneManagers Request Half Week].[Request ID];