Solved

Extracting data from one table that is not in another table

Posted on 2014-09-16
2
189 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
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…
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…
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.

929 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