PercyPercy
New member
- Local time
- Today, 08:27
- Joined
- Jun 29, 2006
- Messages
- 9
For some reason I can't write the proper query to get a simple total from a single table. Here is the basic table design:
Transaction ID___Product ID___ Transaction Date____Transaction Quantity
1______________Product A____6/12/2006__________200
2______________Product B____6/12/2006__________500
3______________Product C____6/14/2006__________100
4______________Product B____6/15/2006__________200
5______________Product C____6/16/2006__________300
6______________Product A____6/17/2006__________500
I'm trying to get the total transactions quantity for each product so that I could end up with a form or a report that would show:
Product ID_____ Transaction Quantity Total
Product A______700
Product B______700
Product C______400
... and so on for each item.
What would actually be entered in the query? I'm assuming I would have four columns in the query:
transaction id____product number____transaction qty____expression
Then I would use the SUM feature so the "group by" row appears.
Then I would build the expression above in an expression column. If that's correct, could you give me the expression typed "exactly" as you think it would appear? I'm getting syntax errors when I'm trying it.
And then, once I have the expression built, what should be the "group by" selection under each of the columns?
Sorry for being so ignorant. The rest of my data base works great... but I'm just not getting this one thing!
Thanks anyone who can help me!
Transaction ID___Product ID___ Transaction Date____Transaction Quantity
1______________Product A____6/12/2006__________200
2______________Product B____6/12/2006__________500
3______________Product C____6/14/2006__________100
4______________Product B____6/15/2006__________200
5______________Product C____6/16/2006__________300
6______________Product A____6/17/2006__________500
I'm trying to get the total transactions quantity for each product so that I could end up with a form or a report that would show:
Product ID_____ Transaction Quantity Total
Product A______700
Product B______700
Product C______400
... and so on for each item.
What would actually be entered in the query? I'm assuming I would have four columns in the query:
transaction id____product number____transaction qty____expression
Then I would use the SUM feature so the "group by" row appears.
Then I would build the expression above in an expression column. If that's correct, could you give me the expression typed "exactly" as you think it would appear? I'm getting syntax errors when I'm trying it.
And then, once I have the expression built, what should be the "group by" selection under each of the columns?
Sorry for being so ignorant. The rest of my data base works great... but I'm just not getting this one thing!
Thanks anyone who can help me!