Delete exclusion data from original query

P

Pete

I have a question about how do I eliminate data from a query. I have 7 tables that I’m pulling information from. 1 of those table is and exclusion table. If we find matching data from my original query in the exclusion table, I am to eliminate it from my report. How do I do this. Do I use a subquery?
 
J

John Vinson

I have a question about how do I eliminate data from a query. I have 7 tables that I’m pulling information from. 1 of those table is and exclusion table. If we find matching data from my original query in the exclusion table, I am to eliminate it from my report. How do I do this. Do I use a subquery?

A "Frustrated Outer Join" query - which the "Unmatched Query Wizard"
will build for you - is the best bet in this case.

Join the "exclude" table to your Query; select the join line and
choose option 2 - "show all data in <your main table> and matching
records in <exclude table>". Select *only* the joining field from the
Exclude table, and put a criterion on it of

IS NULL

This will accept only those main-table records which do *not* have a
matching record.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top