Solved

Extracting data from one table that is not in another table

Posted on 2014-09-16
2
188 Views
Last Modified: 2014-09-16
Experts,

I am creating table10  From Table1.  However, I only want what is not in Table2 - Table9.  The unique key is claim. What would be the most efficient way to do this?
0
Comment
Question by:morinia
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 400 total points
ID: 40325503
try using a make table from a union query

select f1,f2,f3,f4
from table1 left join table2
on table1.claim=table2.claim
where table2.claim is null

union

select f1,f2,f3,f4
from table1 left join table3
on table1.claim=table3.claim
where table3.claim is null
union

...continue up to table9
0
 
LVL 34

Assisted Solution

by:PatHartman
PatHartman earned 100 total points
ID: 40325569
To continue Rey's thought.
After you create the union query, create a query that does a left join of table1 to the union.  Select only records where the key field in the union query is null.
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)

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
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…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

743 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