title: Not in In SQL statement?
body: <p>I have set of ids in excel around 5000 and in the table I have ids around 30000. If I use 'In' condition in SQL statment I am getting around 4300 ids from what ever I have ids in Excel. But If I use 'Not In' with Excel id. I have getting around 25000+ records. I just to find out I am missing with Excel ids in the table.</p>
  
  <p>How to write sql for this?</p>
  
  <p>Example:
   Excel Ids are</p>
  
  <pre><code> 1,
   2,
   3,
   4,
   5,
   6,
   7,
   8,
   9,
  10,
  </code></pre>
  
  <p>Table has IDs</p>
  
  <pre><code> 1,
   2,
   3,
   4,
   6,
   8,
   9,
  11,
  12,
  14,
  15
  </code></pre>
  
  <p>Now I want get <code>5,7,10</code> values from Excel which missing the table?</p>
  
  <h2>Update:</h2>
  
  <p>What I am doing is </p>
  
  <pre><code>SELECT  [GLID]      
    FROM [tbl_Detail] 
    where datasource = 'China' and  ap_ID  not in (5206896,
  5206897,
  5206898,
  5206899,
  5117083,
  5143565,
  5173361,
  5179096,
  5179097,
  5179150)
  </code></pre>