Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

complex join access 2010 matches and non matches

Posted on 2016-07-18
5
Medium Priority
?
44 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
ste5an earned 2000 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 35

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 35

Expert Comment

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

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

721 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