R
ram
HI I wouldlike help with the following question. I recieve the can't group by
in the where clause error in the following subquery. Can someone tell me
where i should have the group by. I tried to create a second select statement
but it didn't work for me.
Thanks in advance for any help
SELECT qryProduction.[AgentID],
Sum(nz([qryProduction]![MTDPoints])+nz([Production]![PolicyCount])) AS Expr1,
(Select [EndingProduction]
From qryProduction as Prod2
Where Max([Prod2].[Snap Month Number]) = Max([qryProduction].[Snap Month
Number]))
AS MaxSnapMonth
FROM qryProduction
GROUP BY qryProduction.[AgentID];
in the where clause error in the following subquery. Can someone tell me
where i should have the group by. I tried to create a second select statement
but it didn't work for me.
Thanks in advance for any help
SELECT qryProduction.[AgentID],
Sum(nz([qryProduction]![MTDPoints])+nz([Production]![PolicyCount])) AS Expr1,
(Select [EndingProduction]
From qryProduction as Prod2
Where Max([Prod2].[Snap Month Number]) = Max([qryProduction].[Snap Month
Number]))
AS MaxSnapMonth
FROM qryProduction
GROUP BY qryProduction.[AgentID];