Solved

complex join access 2010 matches and non matches

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

920 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

15 Experts available now in Live!

Get 1:1 Help Now