rows in A that aren't in B --
Code:
SELECT a.orb_pos
, a.frequency
, a.polarisation
FROM tableA AS a
LEFT OUTER
JOIN tableB AS b
ON b.orb_pos = a.orb_pos
b.frequency = a.frequency
b.polarisation = a.polarisation
WHERE b.orb_pos IS NULL
rows in B that aren't in A --
Code:
SELECT b.orb_pos
, b.frequency
, b.polarisation
FROM tableB AS b
LEFT OUTER
JOIN tableA AS a
ON a.orb_pos = b.orb_pos
a.frequency = b.frequency
a.polarisation = b.polarisation
WHERE a.orb_pos IS NULL
rows which have changed data --
Code:
SELECT a.orb_pos
, a.frequency
, a.polarisation
FROM tableA AS a
INNER
JOIN tableB AS b
ON b.orb_pos = a.orb_pos
b.frequency = a.frequency
b.polarisation = a.polarisation
WHERE b.symbol_rate <> a.symbol_rate
OR b.fec_inner <> a.fec_inner
OR b.DVB_system <> a.DVB_system
OR b.modulation <> a.modulation
OR b.feed <> a.feed
Bookmarks