Using one table as a filter for another table??

  • Thread starter Thread starter qworty
  • Start date Start date
Q

qworty

Guest
I have two tables imported from excell spread sheets.

One is a adress list the other is a list of names that need to be excluded from the mailing to be prepared from the first list.

How can I do this?
 
SELECT Blah FROM TableName WHERE NameField Not In(SELECT NameField FROM SecondTableName)
 
interesting

is that a join property or something done in a query?

I dont think I understand the context of your suggestion.
 
That is SQL (a query) that obviously needs to be updated with your actual table and field names. You could start with a query that selected your data from the first table, then type in the "Not In(..." portion into the criteria portion of the name field. Or you could paste that into an empty query in SQL view and modify it there. If you post a sample db with the 2 tables, I can show you.
 
There is no need to make a subquery. Use the query wizard to build an unmatched query or build it yourself.
 
Not sure I understand still
I have made queries before but only with the query builder not in sql
I can't get a db small enough to post so I am attaching 2 excel files that can be imported to a db (thats how I made the db in the first place).

To help clarify
I know next to nothing about sql and am a novice with access
I have a db that consists of 2 tables that are not linked in any way
I created the tables by importing excel files (2)
Table A is a adress list
Table B is a name list
I need to filter table A using the information in table B
The names in table B are first and last
The names in table A are bussiness or first or last or (first and/or last + business).
I want the filter to exclude anything in table A that contains any part of the contents of the name field of table B

How do I do this please.
 

Attachments

You've got big issues here that are nothing to do with Excel or Access. The data in the two tables is not consistent, and doing any kind of match is going to be a nightmare.

You may be able to do a match on surnames, but you may get a lot of spurious matches. Jones will match Jones even if it's Fred Jones in one table and Amanda Jones in the other. Your address data doesn't consistently contain forenames or initials, neither is it clear whether the names are forenames or surnames. Is John Wallace Steven Brown one guy or two?

You'll need to do so much manual intervention that you might as well hand sort it in the first place.
 
Our programers wrote something in FoxPro the was able to do what I need.
Thanks or all advice though.
 

Users who are viewing this thread

Back
Top Bottom