Different on two tables

  • Thread starter Thread starter Christine Imbeault
  • Start date Start date
C

Christine Imbeault

Hi,

Access 2000

My table1
Name of fields =a
1
2
3
5

My table2
Name of fields =b
1
2
3

I create a query for have difference of two tables.
My query is:
SELECT [Table1].[a]
FROM Table1 INNER JOIN table2 ON [Table1].[a]=[table2].
WHERE a<>b;

My response is nothing but i want 5 as response
 
But a will never equal b as that is what you are joining on..

SELECT Table1.a, Table2.b
FROM Table1 LEFT JOIN Table2 ON Table1.a = Table2.b
WHERE (((Table2.b) Is Null));
 
I believe your WHERE clause should read:

WHERE [table2]. is Null

or, you could create your query using the Find Unmatched Query wizard
 
Back
Top