I am running the following queries in MS SQL Server (version 2016 if that matters).
SELECT DISTINCT Job_Number
FROM table_A
WHERE Job_Number IS NOT NULL
returns 2376 rows
SELECT *
FROM table_A
WHERE Job_Number IN (SELECT DISTINCT [House Bill] FROM table_B)
returns 137 rows
However,
SELECT *
FROM table_A
WHERE Job_Number NOT IN (SELECT DISTINCT [House Bill] FROM table_B)`
returns 0 rows. I would expect this would return 2239 rows (i.e. 2376 - 137).
Is there any fundamental concept of NOT IN that I have yet to understand here?