swiny
Programmer
- Nov 9, 2010
- 7
Hi I have the 2 tables below:
TableA
ReceiptNo ItemNumber Quantity
111 A 100
222 A 200
333 A 300
333 B 400
444 A 250
555 B 300
666 A 100
666 B 350
777 A 450
TableB
ItemNumber QuantityTotal
A 900
B 850
I need to list everything in TableA to get the total of A, that comprises of the total in TableB (same with itemB)
Meaning
I need to list
777 A 450
666 A 100
444 A 250
333 A 100 (not 300)
666 B 450
555 B 300
333 B 100
What would be the easiest way to inquire on it?
To creating a running sum?
Your feedback is appreciated.
Thanks.
TableA
ReceiptNo ItemNumber Quantity
111 A 100
222 A 200
333 A 300
333 B 400
444 A 250
555 B 300
666 A 100
666 B 350
777 A 450
TableB
ItemNumber QuantityTotal
A 900
B 850
I need to list everything in TableA to get the total of A, that comprises of the total in TableB (same with itemB)
Meaning
I need to list
777 A 450
666 A 100
444 A 250
333 A 100 (not 300)
666 B 450
555 B 300
333 B 100
What would be the easiest way to inquire on it?
To creating a running sum?
Your feedback is appreciated.
Thanks.