Comparing two excel tables and find the gaps between them;

lubna

New member
Local time
Today, 18:09
Joined
May 18, 2016
Messages
1
[FONT=&quot]Hi All,[/FONT]
[FONT=&quot]I have 2 table and I want to find the gap between them and join them in one table to better comparison and presentation of gaps
as described in the attached screenshot
[/FONT]

[FONT=&quot][/FONT]
[FONT=&quot]Can I do this comparison using Microsoft access?[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Thank you,[/FONT]
[FONT=&quot]Lubna[/FONT]​
 

Attachments

  • Clip_3.jpg
    Clip_3.jpg
    58.1 KB · Views: 160
Actually, what you want is called a FULL OUTER JOIN (google that)...and its not supported in Access, so you have to do it yourself. Part of achieving it is using a UNION query. Here's how:

1. In design view, make a query based on Table1 and Table2. Link them apporpriately (C1 to C2) and then change that join line to the option that says something like 'Show All From Table1'. Bring down all the fields from both tables. Save this query as 'sub1'.

2. Make a copy of sub1 and name it sub2. Go into design view and change the join line to the option that says something like 'Show All From Table2'. Save the query.

3. Make a UNION query based on those 2 sub queries. This would be that SQL:

Code:
SELECT * FROM sub1 UNION SELECT * FROM sub2

That query will give you the results you want.
 

Users who are viewing this thread

Back
Top Bottom