title: SQL Except or Minus
body: <p>I have two table with same "id" for companies and i need for "select all" make as minus special companies which do invoice in concrete date.</p>
  
  <p>I tried minus fuctions but its does not work in our ERP systems but i can use "except" but it does not work the way I need it.</p>
  
  <pre><code>SELECT ad.idfirmy FROM aadresar as ad .............\\ (select all)
  EXCEPT
  SELECT DISTINCT f.idfirmy FROM ddoklfak as f ...... \\ (this i need minus from all sellect)
  WHERE modul = 'FAV' and f.datvyst &gt;= '&lt;&lt;datum_od&gt;&gt;' and f.datvyst &lt;= 
  '&lt;&lt;datum_do&gt;&gt;') db on db.idfirmy = ad.idfirmy
  </code></pre>
  
  <p><strong>For examble</strong> i have "idfirmy value 193451" which is in second select and after except is still this value in result but its so bad.</p>
  
  <p>I need second select subtract from first</p>