I have 3 tables with the following structure:
Table_A:
Date
,ID
,A1
,A2
.
Table_B:
Date
,ID
,B1
.
Table_C:
Date
,ID
,C1
,C2
,C3
.
I want to join all three into a table with attributes: Date
, ID
, A1
, A2
, B1
, C1
, C2
, C3
.
For the 3 tables some of the Dates and IDs are the same but some are not so I want to do something like a LEFT JOIN
with a UNION
and then RIGHT JOIN
so that I don't lose any of the Date and ID rows. It seems like I need the Date and ID combinations to get their own unique identifiers so that I can then join the tables but I have hit a road block.