Here's my problem and I need some help, please. Two tables, T1 and T2. Each has three fields, SID, PID and QTY. See my example below with various field values in SID and PID.
T1:
SID, PID, QTY
s1,ps1,0
s1,p2,0
s2,p1,0
s2,p2,0
T2:
SID, PID, QTY
s1,p1,3
s1,p1,5
s1,p2,3
s1,p2,6
s2,p1,1
s2,p2,3
I need a query that will consolidate quantities in T2 where SID and PID pairings are the same; i.e., s1,p1 are found twice so sum the QTY and update the QTY field where the T2 F1/F2 pairing matches the T1 F1/F2 pairing.
The resultant T1 table would look like this:
SID, PID, QTY
s1,p1,8
s1,p2,9
s2,p1,1
s2,p2,3
Thanks as always for the great help this forum provides.
T1:
SID, PID, QTY
s1,ps1,0
s1,p2,0
s2,p1,0
s2,p2,0
T2:
SID, PID, QTY
s1,p1,3
s1,p1,5
s1,p2,3
s1,p2,6
s2,p1,1
s2,p2,3
I need a query that will consolidate quantities in T2 where SID and PID pairings are the same; i.e., s1,p1 are found twice so sum the QTY and update the QTY field where the T2 F1/F2 pairing matches the T1 F1/F2 pairing.
The resultant T1 table would look like this:
SID, PID, QTY
s1,p1,8
s1,p2,9
s2,p1,1
s2,p2,3
Thanks as always for the great help this forum provides.