I am trying to do a full outer join of two tables, matching them with the "PO Product Code" of table 1 and "Product Code" of table 2. Each time I attempt to do this, there are a few product codes that are left out:
CABSCABS0000, DOORINTD0015, FLORCARP0001, EXCL0001, and FLORTILE0000
Each of these product codes are in table 2, but not in table 1.
Here are the screenshots of the tables I am working with.
https://i.stack.imgur.com/1XDMa.png
https://i.stack.imgur.com/CWSDw.png
And here is the code that I have tried:
SELECT cost.[Actual Close]
,cost.[Project Name]
,cost.[Lot]
,cost.[Model]
,cost.[Elev]
,cost.[PO Product Code]
,cost.[Invoiced + Open] AS 'Invoiced + Open'
,rev.[Gross Sale] AS 'Gross Sale'
FROM Table1 cost FULL OUTER JOIN
Table2 rev
ON rev.[Product Code] = cost.[PO Product Code]
WHERE rev.[Project Name] = cost.[Project Name] AND
rev.[Lot] = cost.[Lot];
I must also mention that the Product Code is specific to each Project Name and Lot, which is why that is added to the 'WHERE' clause.
Here is the output I got, which is missing the 5 craft codes listed above.