title: SQL select where not in select statement
body: <p>I'm trying to Select all the records in my database that don't exist in a subquery.</p>
  
  <p>For some reason it returns nothing even though the sub query returns 2000 or so rows on it's own and the main query returns over 5000. I need all the records that aren't contained in the subquery</p>
  
  <pre><code>SELECT ID
  FROM PART
  WHERE NOT ID IN 
  (
  SELECT DOCUMENT_ID AS ID
  FROM USER_DEF_FIELDS
  WHERE PROGRAM_ID = 'VMPRTMNT' AND ID = 'UDF-0000029'
  )
  </code></pre>