Avatar of gfranco
gfranco
Flag for United States of America

asked on 

Extract unmatched records from Access

Hi,

I have two tables with this structure

tblSOM
=======
ID         Contract         Cliente          Region
1           765                 A                 R1
1           1567               D                 R1
2           766                 B                 R2
3           777                 C                 R3
4           888                 D                 R4
5          9999                E                  R5

tblContracts
========

ID         Contract         Cliente          Region
1           765                 A                 R1
1           1567               D                 R1
1           99990             Z                 R2
2           11                   A                 R3
2           766                 B                 R2
3           777                 C                 R3
3          23234              18                R2
4           888                  D                 R4
5          999901             E                  R5

So, I would like to get the all contracts that not exits on the table tblContracts
The match criteria is the ID
For example on this 2 tables my final result would be the list of the contract that not in on table tblSOM

qryFinal
ID         Contract         Cliente          Region
1           99990               Z                 R2
2           11                     A                 R3
3          23234               18                R2
4           888                   D                 R4
5          999901              E                  R5

SQL

Avatar of undefined
Last Comment
Sharath S

8/22/2022 - Mon