I have 2 tables, catalog
and seriesTitle
.
I need to select instances of SERIES_CODE
that exist in one table, but not the other, as follows:
SELECT SERIES_CODE
FROM catalog
WHERE SERIES_CODE NOT IN
(SELECT SERIES_CODE
FROM seriesTitle)
The query executes successfully, and results are returned.
However, the results are incomplete. I am 100% positive that there are some SERIES_CODE
s that exist in catalog
, but not seriesTitle
.
I have checked that the type and collation of SERIES_CODE
is the same in both tables.
Is it possible there is some data corruption, or other issue other than the simple query above? Or perhaps my query is wrong somehow? (I'm not worried about performance right now, just results!)