I have 2 tables. 1 table is a linked tabled from an oracle database. All three fields in both tables must be unique, I think you call it a "composite" key?
Anyways, my goal is to write a query that compares the two tables and shows any different rows between them eliminating the same rows.
Eventually, I want to update the data in Table B with new records I find in Table A. I've written the query at the bottom but it returns no records and I can not figure out why as I know there are differences. Any help would be greatly appreciated!
Table A
----------
field1
field2
field3
Table B - Linked table
----------
field1
field2
field3
SELECT tableA.field1, tableA.field2, tableA.field3
FROM tableA
LEFT JOIN
tableB ON tableA.field1=tableB.field1
AND tableA.field2=tableB.field2
AND tableA.field3=tableB.field3
WHERE
(((tableB.field1) Is Null))
OR (((tableB.field2) Is Null))
OR (((tableB.field3) Is Null));
Anyways, my goal is to write a query that compares the two tables and shows any different rows between them eliminating the same rows.
Eventually, I want to update the data in Table B with new records I find in Table A. I've written the query at the bottom but it returns no records and I can not figure out why as I know there are differences. Any help would be greatly appreciated!
Table A
----------
field1
field2
field3
Table B - Linked table
----------
field1
field2
field3
SELECT tableA.field1, tableA.field2, tableA.field3
FROM tableA
LEFT JOIN
tableB ON tableA.field1=tableB.field1
AND tableA.field2=tableB.field2
AND tableA.field3=tableB.field3
WHERE
(((tableB.field1) Is Null))
OR (((tableB.field2) Is Null))
OR (((tableB.field3) Is Null));