title: NOT IN condition in SQL
body: <p>Can anyone tell me the exact syntax for NOT IN condition in SQL on two columns.</p>
  
  <p>This is my query written in VBA.</p>
  
  <pre><code>strNewSql = "SELECT distinct(tblRevRelLog_Detail.PartNumber), tblRevRelLog_Detail.ChangeLevel, tblRevRelLog_Detail.ID FROM tblRevRelLog_Detail LEFT JOIN tblEventLog ON tblRevRelLog_Detail.PartNumber = tblEventLog.PartNumber"
  
  strNewSql = strNewSql &amp; " WHERE (tblEventLog.PartNumber) Not In(SELECT tblEventLog.PartNumber FROM tblEventLog WHERE tblEventLog.EventTypeSelected = 'pn REMOVED From Wrapper') AND tblEventLog.TrackingNumber = """ &amp; tempTrackingNumber &amp; """ AND tblEventLog.TrackingNumber =  tblRevRelLog_Detail.RevRelTrackingNumber;"
  </code></pre>
  
  <p>I want to change this sub query like, it should apply on the combination of two columns as follows:</p>
  
  <pre><code>strNewSql = "SELECT tblRevRelLog_Detail.PartNumber, tblRevRelLog_Detail.ChangeLevel, tblRevRelLog_Detail.ID FROM tblRevRelLog_Detail LEFT JOIN tblEventLog ON tblRevRelLog_Detail.PartNumber = tblEventLog.PartNumber"
  
  strNewSql = strNewSql &amp; " WHERE (((tblEventLog.PartNumber, tblEventLog.PartNumberChgLvl) Not In(SELECT tblEventLog.PartNumber,tblEventLog.PartNumberChgLvl FROM tblEventLog WHERE tblEventLog.EventTypeSelected = 'pn REMOVED From Wrapper') AND tblEventLog.TrackingNumber = """ &amp; tempTrackingNumber &amp; """ AND tblEventLog.TrackingNumber =  tblRevRelLog_Detail.RevRelTrackingNumber);"
  </code></pre>
  
  <p>But this is not working.....</p>