Link to home
Start Free TrialLog in
Avatar of rp
rpFlag for Portugal

asked on

List records do not exist in other table

Hi,

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
SOLUTION
Avatar of Jan Louwerens
Jan Louwerens
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial