J
juvi
Hello,
thx for any help in advance. I have got this query for comparing two tables
for differences. It works fine, but which changes must I do to only get the
query result from table B? I know that only table B can have changes so I do
not need the records from table A.
SELECT ID, COL1, COL2, COL3 ... INTO tbl_diff
FROM
(
SELECT A.ID, A.COL1, A.COL2, A.COL3, ...
FROM A
UNION ALL
SELECT B.ID, B.COL1, B.COl2, B.COL3, ...
FROM B
) tmp
GROUP BY ID, COL1, COL2, COL3 ...
HAVING COUNT(*) = 1
ORDER BY ID
thx for any help in advance. I have got this query for comparing two tables
for differences. It works fine, but which changes must I do to only get the
query result from table B? I know that only table B can have changes so I do
not need the records from table A.
SELECT ID, COL1, COL2, COL3 ... INTO tbl_diff
FROM
(
SELECT A.ID, A.COL1, A.COL2, A.COL3, ...
FROM A
UNION ALL
SELECT B.ID, B.COL1, B.COl2, B.COL3, ...
FROM B
) tmp
GROUP BY ID, COL1, COL2, COL3 ...
HAVING COUNT(*) = 1
ORDER BY ID