I have two tables, one includes new data to be imported into a second table. I want to flag records in the second table with matching key fields as inactive, prior to importing the new data.
My join looks like this:
But the result is always the complete contents of table_2, instead of the matching records. Can someone help me see the error of my ways here?
TIA,
-ADM
My join looks like this:
Code:
SELECT table_2.rec_no
FROM table_2
LEFT JOIN table_1
ON table_2.key=table_1.key
WHERE
table_2.key IS NOT NULL
But the result is always the complete contents of table_2, instead of the matching records. Can someone help me see the error of my ways here?
TIA,
-ADM