>The inner join includes "only" the T1 records that match customer numbers in T2.
>
>I want all the customer numbers in both tables to be in the resultant table
>
>I have customer numbers that only exist in each table so they are excluded from the join?
>
>So if there is a customer that we did not have any sales with in one of the two years, it is omitted from the result. I need them to be included in the comparison showing the sales total as zero in the year nothing exists.
Did you see my second answer? Use FULL JOIN instead of the INNER JOIN to include all customers.
If it's not broken, fix it until it is.
My Blog