I have 2 separate queries that return identically structured tables. I will need to combine the two tables such that the result table containes the difference between a column in both tables. In other words:
Query1: (Select id1,qty1 from TableA Left Join TableB)
id1 qty1
----------
1 10
2 20
3 8
4 5
5 3
Query2: (Select id2,qty2 from TableC Left Join tableD)
id2 qty2
----------
1 3
2 16
3 2
4 0
6 1
Result: (Query1 - Query2)
ID QTY
----------
1 7
2 4
3 6
4 5
5 3
As the result indicates, I will need to retain all ids returned from Query 1 but not Query 2.
Thanks!
Regards,
Lynn