Query help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two tables, one of the tables is just a list of names, the other table
has a lot of account information as well as a much larger list of names. I
want to run a query that will display all of the accounts on the second table
that do not have a name that is on my first table. Can some one please tell
me how to do this? I'm a beginner.

Thanks for the help.
 
I think you can try to use the following query

SELECT *
FROM [table1]
WHERE [name] NOT IN (SELECT [name] FROM [table2])

Lucas
 
I have two tables, one of the tables is just a list of names, the other table
has a lot of account information as well as a much larger list of names. I
want to run a query that will display all of the accounts on the second table
that do not have a name that is on my first table. Can some one please tell
me how to do this? I'm a beginner.

Thanks for the help.

The "Unmatched Query Wizard" will set this up for you. Create a new
Query, choose the Unmatched wizard, and follow the prompts. If you
have problems with it please post back with a bit more detail about
your tables (do they have a Primary Key? if it's JUST a list of names
how do you handle the case of two different people who happen to have
the same name?)

John W. Vinson[MVP]
 
Back
Top