I have this problem using access: I am using the RIGHT + LEFT outer joins to overcome the fact that ACCESS does not support the FULL JOIN.
SELECT *
FROM T1 RIGHT OUTER JOIN T2
ON T1.xxx = T2.xxx
UNION
SELECT *
FROM T1 LEFT OUTER JOIN T2
ON T1.xxx = T2.xxx
on these tables:
T1:
ID1 | xxx | fieldA
a 1 X
b 2 Y
c 3 Z
T2:
ID2 | xxx | fieldB
d 2 K
e 3 J
f 4 H
AS a result I obtain a table with this structure
T1.xxx | T2.xxx | fieldA | fieldB | ID1 | ID2
1 X a
2 2 Y K b d
3 3 Z J c e
4 H f
xxx is not primary key but has the same name and numerical type (integer)
I saw from many other places that this should work by collapsing the two tables! Here it does not (the elements on the same rows, when non blank, are of course the same)
MY EXPECTATION
FINAL TABLE:
xxx | ID1 | ID2 |fieldA | fieldB
1 a X
2 b d Y K
3 c e Z J
4 f H