Track missing records

  • Thread starter Thread starter Boot
  • Start date Start date
B

Boot

Guest
Hello people. Iam having a problem and i need some help.
iam appending data in one table to data in another another.
I have two tables(table1 and table2), with the same fields but the records in one table2 are 5 more than those in table1 which are 3.
The 3 records in table1 are also in table2.
I would like a query which outputs the other 2 records that are in table2 and not in table1.

Thanks in advance.
 
My Table1 has structure
ID Name Class
1 John s1
2 Steve s2
3 Pocker s3

Table2 has structure

ID Name Class
1 John s1
2 Roland s2
3 Pocker s3
4 Steve s2
5 Duncan s4

Code:
SELECT table2.* FROM Table1,Table2 WHERE((Table2.Name)=(Table1.Name))

The qry above returns
1 John s1
3 Pocker s3
4 Steve s2

I want a qry that returns the opposite

2 Roland s2
5 Duncan s4

I have tried this but it doesnt do the trick

Code:
SELECT table2.* FROM Table1,Table2 WHERE((Table2.Name)<>(Table1.Name))
 
Last edited:
Have you tried using the Unmatched Query Wizard?
 
Use the Wizard to create a new query and select Unmatched Query! The wizard will walk you through the steps.
 
'ello,
I know it's been a while on this question but I was seraching for something else and stumbled accross this on my way.
If you Don't haave the Unmatched Query or you're writing an .adp have a look for "outer join" in the MSAccess help. There's a step by step guide how to do this manually (at least in Access 2003).

All the best

Marc
 

Users who are viewing this thread

Back
Top Bottom