title: Return Values not existing in table or not equal to a value
body: <p>I have 2 tables (SQL) EntityAttachment EA and UnitInventory UI.  UI.StockNumber can have attachments (documents) that are stored in the EntityAttachment table.</p>
  
  <p>I am trying to figure out which Distinct UI.StockNumber have no entries in the EA table at all (meaning no documents) and combine that list with Distinct UI.StockNumber that have entries but don't have EA.Extension = 'jpg'.  So really, I am looking for UI.StockNumber that do not have extension = 'jpg'.</p>
  
  <p>UI.UnitInventoryID = EA.EntityID</p>
  
  <p>It's easy to join the two tables and filter out the EA.Extensions = 'jpg', but then I miss the ones that don't exists at all in the EA table.  I am lost and have been trying for far too long.  I also was able to return all the NULL values (ones that don't exist at all in the EA table), but then I missing the ones that have extensions of pdf, xls, etc. but not jpg.</p>
  
  <p>Is this enough info to help?  I am struggling on this one.</p>