I'm not sure my title was appropriate.
I have two tables - Table1 has This Year sales data, Table 2 has Last Year sales data.
The data is grouped by Line and Plcd.
So, when Line and Plcd from Table1 matches Table2, I need to subtract This Year Sales from Last Year Sales.
However, if there are a Line and Plcd from Table1 that aren't on Table2, I still need to display the sales data from Table1 (i.e. This Year's Sales) and vice versa.
How can I "join" these tables to perform calculations when they match, and then to show only the data available when they don't match? I don't see where and inner or outer join will work here.
I have two tables - Table1 has This Year sales data, Table 2 has Last Year sales data.
The data is grouped by Line and Plcd.
So, when Line and Plcd from Table1 matches Table2, I need to subtract This Year Sales from Last Year Sales.
However, if there are a Line and Plcd from Table1 that aren't on Table2, I still need to display the sales data from Table1 (i.e. This Year's Sales) and vice versa.
How can I "join" these tables to perform calculations when they match, and then to show only the data available when they don't match? I don't see where and inner or outer join will work here.