rp
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.