N
Nero
HEllo.... in the below SQL statement, please advise why i'm getting error:
"You TRied to exeute a query that does not include the specified expression
'ScheduledTime/Targets.AHTtarget' as part of an aggregate function."
SELECT [Agent_ Details].AgentId, [Agent_ Details].Supervisor, [Agent_
Details].Region, [Agent_ Details].JobTitle, Format$(ActivityTbl.Date,'mmmm
yyyy') AS [Date By Month], Sum(ActivityTbl.ActualCalls) AS ActualCalls,
Avg(ActivityTbl.ActualAht) AS ActualAht,
Sum(AgentDailySchedTime.ScheduledTime) AS ScheduledTime,
ScheduledTime/Targets.AHTTarget as TargetCalls
FROM (([Agent_ Details] INNER JOIN AgentDailySchedTime ON [Agent_
Details].AgentId = AgentDailySchedTime.AgentId) INNER JOIN ActivityTbl ON
[Agent_ Details].AgentId = ActivityTbl.AgentId) INNER JOIN Targets ON [Agent_
Details].JobTitle = Targets.ServiceArea
GROUP BY [Agent_ Details].AgentId, [Agent_ Details].Supervisor, [Agent_
Details].Region, [Agent_ Details].JobTitle, Format$(ActivityTbl.Date,'mmmm
yyyy'), Year(ActivityTbl.Date)*12+DatePart('m',ActivityTbl.Date)-1;
Thank you for your time.
"You TRied to exeute a query that does not include the specified expression
'ScheduledTime/Targets.AHTtarget' as part of an aggregate function."
SELECT [Agent_ Details].AgentId, [Agent_ Details].Supervisor, [Agent_
Details].Region, [Agent_ Details].JobTitle, Format$(ActivityTbl.Date,'mmmm
yyyy') AS [Date By Month], Sum(ActivityTbl.ActualCalls) AS ActualCalls,
Avg(ActivityTbl.ActualAht) AS ActualAht,
Sum(AgentDailySchedTime.ScheduledTime) AS ScheduledTime,
ScheduledTime/Targets.AHTTarget as TargetCalls
FROM (([Agent_ Details] INNER JOIN AgentDailySchedTime ON [Agent_
Details].AgentId = AgentDailySchedTime.AgentId) INNER JOIN ActivityTbl ON
[Agent_ Details].AgentId = ActivityTbl.AgentId) INNER JOIN Targets ON [Agent_
Details].JobTitle = Targets.ServiceArea
GROUP BY [Agent_ Details].AgentId, [Agent_ Details].Supervisor, [Agent_
Details].Region, [Agent_ Details].JobTitle, Format$(ActivityTbl.Date,'mmmm
yyyy'), Year(ActivityTbl.Date)*12+DatePart('m',ActivityTbl.Date)-1;
Thank you for your time.