Different on two tables

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
 
J

JohnFol

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));
 
C

Cheryl Fischer

I believe your WHERE clause should read:

WHERE [table2]. is Null

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top