Solved

complex join access 2010 matches and non matches

Posted on 2016-07-18
5
33 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 32

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 32

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 32

Expert Comment

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

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now