Q
Question Boy
How would I build a query that would sum up the total per itemid for 2 table
and then return the substraction value. Let me explain
I have table1 with 2 fields (id and qty) and table2 with 2 fields (id and qty)
I need to perform the summation per id of each and then return the vaule for
each id substracting the value from table2 from table1
Say table1 has
id=1,qty=12
id=1, qty=3
table2 has
id=1,qty=4
id=1,qty=6
I need a query that will return (12+3)-(4+6)
id=1,qty=5
for each id
Thank you for your guidance,
QB
and then return the substraction value. Let me explain
I have table1 with 2 fields (id and qty) and table2 with 2 fields (id and qty)
I need to perform the summation per id of each and then return the vaule for
each id substracting the value from table2 from table1
Say table1 has
id=1,qty=12
id=1, qty=3
table2 has
id=1,qty=4
id=1,qty=6
I need a query that will return (12+3)-(4+6)
id=1,qty=5
for each id
Thank you for your guidance,
QB