Solved

complex join access 2010 matches and non matches

Posted on 2016-07-18
5
36 Views
Last Modified: 2016-07-26
I have imported 2 datasets into 2 tables from excel into access (dataset1 and dataset2). There are 3 fields on each dataset that I need to join (address1, address2, zipcode). What I then need to do is where "fullname" from dataset2 does not match any of the names listed in any of the joined rows. How would we go about this. So I want the results to return where address fields match, instances where name does not match in any of the joined rows.
0
Comment
Question by:pma111
  • 3
  • 2
5 Comments
 
LVL 33

Accepted Solution

by:
ste5an earned 500 total points
ID: 41716987
Create a normal query with your JOIN. And add a condition on the fullname column.

Capture.PNG
or maybe this:

Capture.PNG
0
 
LVL 3

Author Comment

by:pma111
ID: 41718282
First solution not quite working - basically if 5 named people living at a specific address in dataset 1, what we need to do is list instances whereby in dataset 2, where the address matches, list instances whereby the name listed for that address does not match any of the names listed at that address in dataset 1. What the first solution is doing is showing matches on that address for every person but those listed on dataset 2.
0
 
LVL 33

Expert Comment

by:ste5an
ID: 41718962
Maybe.

But you haven't posted sample data and the desired result, so it's hard to guess what you need.. one good sample tells more than a thousand words.
0
 
LVL 3

Author Comment

by:pma111
ID: 41719044
e.g. would be

table1:
name - b.smith addr1 - 123 street, addr2 - london, zip - ld34ft
name - c.smith addr1 - 123 street, addr2 - london, zip - ld44ft

table2:
a.smith 123 street, london, ld34ft

if you join on addr1, addr2 and zip - it will cleary join the record from table 2 to the records in table 1, but what I need a query to then do is say "is a.smith in table2 a name also registered at that address in table1 which it joined to", which in this case it isnt (as only b.smith and c.smith are listed at that address, so it should just return all rows from table2, where addresses match, but the name does not match with a name registered at that address.
0
 
LVL 33

Expert Comment

by:ste5an
ID: 41719108
This is what the first query returns. table1 = dataset2 and table2 = dataset1.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question