I'm trying to list all the records in a table that do not exist in the other table. The table that has the records is Obr and the table where records are missing is ObrLin. However I am not getting the expected result. It may be because the field I want to compare is different in the two tables. At first the field is "Idstamp" and the second is "Idstampobr"
SELECT Obr.Cobr, Obr.Cf, Obr.ent, Obr.Idstamp,Obr.Temp FROM Obr
WHERE Obr.Idstamp NOT IN(SELECT Obr.Idstamp FROM ObrLin WHERE ObrLin.IdStampObr IS NOT NULL)
order by Cobr