S
steve a
Hi i'm stuggling with this error message and don't understand how to get
around it.
the error reads:
"you tried to execute a query that does not includde the expression 'time'
as part of an aggregate function."
SELECT[activity table].time, [activity table].ID, [activity table].patient,
[activity table].activity, [activity table].[reason for cancellation],
[activity table].Dept, [activity table].Staff, [activity table].Datein,
[activity table].Ward, [activity table].cost, [activity table].xtrstaff,
IIf([activity]="court apperance",30,0) AS extra, IIf([reason for
cancellation]>"",0,(Sum(([xtrstaff]*([time]/60))))+Sum(IIf([activity]="court
appearance",30,0))) AS xtrcost
FROM [activity table];
the complete SQL is as follows
around it.
the error reads:
"you tried to execute a query that does not includde the expression 'time'
as part of an aggregate function."
SELECT[activity table].time, [activity table].ID, [activity table].patient,
[activity table].activity, [activity table].[reason for cancellation],
[activity table].Dept, [activity table].Staff, [activity table].Datein,
[activity table].Ward, [activity table].cost, [activity table].xtrstaff,
IIf([activity]="court apperance",30,0) AS extra, IIf([reason for
cancellation]>"",0,(Sum(([xtrstaff]*([time]/60))))+Sum(IIf([activity]="court
appearance",30,0))) AS xtrcost
FROM [activity table];
the complete SQL is as follows