Bare lav en ydre sammenføjning, men brug også sammensmeltning
SELECT
COALESCE(a.master,b.master) master,
a.ColA,
b.ColB
FROM
a FULL OUTER JOIN B
ON a.master = b.master
AND (a.ColA = b.ColB
or a.ColA is Null
or b.ColB is Null)
ORDER BY
COALESCE(a.master,b.master),
COALESCE(a.cola,b.colB)
Se det fungere her