xcmuchip
Programmer
- May 31, 2001
- 70
select date, [N/S], productcode, sum([#CS]) as SumCases from espnorth
UNION select date, [N/S], productcode, sum([#cs]) as SumCases from espsouth
group by date, [n/s], productcode
ORDER BY date, productcode;
Error is "You tried to execute a query that doesn't include the specified expression 'date' as part of an aggregate function." These are pre-existing databases, so the names of the fields are not my idea. If I take the sum function out, the error disappears.
Why am I getting this error? Thanks for your help.
UNION select date, [N/S], productcode, sum([#cs]) as SumCases from espsouth
group by date, [n/s], productcode
ORDER BY date, productcode;
Error is "You tried to execute a query that doesn't include the specified expression 'date' as part of an aggregate function." These are pre-existing databases, so the names of the fields are not my idea. If I take the sum function out, the error disappears.
Why am I getting this error? Thanks for your help.