Solved

complex join access 2010 matches and non matches

Posted on 2016-07-18
5
42 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 34

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 34

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 34

Expert Comment

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

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

738 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