I have two views, which contains an ID, Unit and Quantity. One view is for actuals and one for estimates. I want a select statement that will return all rows from both views, for a specific ID, regardless of whether the units are in both views. I can't seem to get this to work with the FULL OUTER JOIN, as I need to join on the ID and the Unit.
In this example vVMVoyEstTotalBLQuantitySrch contains an entry for CBM, which is not in vVMVoyBLQuantitySrch. I still want all the lines, eg:
It could also be the other way around, eg that vVMVoyEstTotalBLQuantitySrch does not contain a specific unit, but vVMVoyBLQuantitySrch does, and again I want all rows. If it is in at least one of the views, return it.
I have tried some code snippets from the internet, using COALESCE on both ID and Unit, but then I only get the missing entry (CBM), and not all.
Please help!