Question : help with an sql join query?

Hi,

I have two tables in my access database as follows.
I am trying to get the records those exist in tblMap2 for TranID = "Borrower" and does not exist in tblMap1. In the below tables I need to get the records d3 and d4 for TranID = "Borrower" because these records does not exist in tblMap1 where TranID = "Borr".

Can anybody please help me how to write this query?
Thanks.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
tblMap1

TranID     FieldName
------     ---------
Borr       d1
Borr       d2
Grntr  	   d1
Grntr      d2
Grntr      d3
Cos        d1
Cos        d2
Cos        d3


tblMap2

TranID     FieldName
------     ---------
Borrower   d1
Borrower   d2
Borrower   d3
Borrower   d4
Guarantor  d1
Guarantor  d2
Guarantor  d3
Cosigner   d1
Cosigner   d2
Cosigner   d3

Answer : help with an sql join query?

try this
1:
2:
3:
4:
select *
  from tblMap2
 where TranID = 'Borrower'
   and FieldName not in (select FieldName from tblMap1 where TranID = 'Borr')
Random Solutions  
 
programming4us programming4us