number not in both the query

R

Ranjit kurian

Hi

I have created two queries and the datas are picked from different tables.
Example are shown below

when i run Query1, below are the answers
Query1:
Number
1
2
3
6

when i run Query2, below are the answers
Query2:
Number
1
1
3
4
4
5

Now, i need to identify the Number which are not there in Query1 when
compare with Query2, and the answer should be like below

Number
4
5
 
K

Ken Snell \(MVP\)

SELECT DISTINCT Query2.[Number]
FROM Query2 LEFT JOIN Query1
ON Query2.[Number] = Query1.[Number]
WHERE Query1.[Number] Is Null;
 
E

Evi

If you are on the Query 'page' of your database, click New and choose Find
Unmatched. Choose your 2 queries.
When you have finished, in Design View of the new query, click below the
white grid, click on Properties, and choose Yes next to Unique Values.
Evi
 

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