SELECT something FROM somewhere WHERE something IN (a, b, c)
produces normal results, and,
SELECT something FROM somewhere WHERE something NOT IN (a, b, c)
should give me all results from column something in table somewhere, but it gives me many times more randomly repeating lines than there is in a table. All examples of NOT IN on the internet are with strings of text, and I’m working with numbers, is there something different?
Receiving “many times more” rows in your result is almost always the result of an improper join. Examine the JOIN statements in your FROM clause and/or any table relationships you specify in you WHERE clause.
Make sure that you aren’t including any tables in your FROM clause that aren’t properly joined to the other tables in the SELECT statement.
Good luck!