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.
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.
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 >= '<<datum_od>>' and f.datvyst <=
'<<datum_do>>') db on db.idfirmy = ad.idfirmy
For examble i have "idfirmy value 193451" which is in second select and after except is still this value in result but its so bad.
I need second select subtract from first