S
sahafi
My query is based on 2 tables (pounds & Hours). Both tables use autonumber as
a PK. Both tables share 5 similar fieldsYear, Month, Week, Location,
ProdCategory) but as you can see none of those fields is unique. The pound
table has additional field (ProdCode) by which the pounds are grouped.
In the query I need to show only the Year (no month/week), Location,
ProdCategory, and SumOfPounds form the pound table, plus the (Hours) from the
hours table. When I group all 4 fields and sum the pounds field, I get a
large data (as if i'm pulling weekly data). When I sum the hours as well as
the pounds I get a wrong result (way larger numbers for both fields than it
shoud be).
How can I get sum of pounds/hours for each ProdCategory at each Location for
the year as one number?
Thanks.
a PK. Both tables share 5 similar fieldsYear, Month, Week, Location,
ProdCategory) but as you can see none of those fields is unique. The pound
table has additional field (ProdCode) by which the pounds are grouped.
In the query I need to show only the Year (no month/week), Location,
ProdCategory, and SumOfPounds form the pound table, plus the (Hours) from the
hours table. When I group all 4 fields and sum the pounds field, I get a
large data (as if i'm pulling weekly data). When I sum the hours as well as
the pounds I get a wrong result (way larger numbers for both fields than it
shoud be).
How can I get sum of pounds/hours for each ProdCategory at each Location for
the year as one number?
Thanks.