Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Join without a key?? :( 2

Status
Not open for further replies.

SeeWard

Programmer
Mar 21, 2005
89
US
Here we go again...
I have two tables with similar info. Neither table has a primary key believe it or not. I need all the people from Table1 who aren't in Table2. I'm trying to use last name as a key but oh my head......Any suggestions would be helpful.
 
Do you have table and field names? What constitutes a unique "people"?

One generic method would be:
SELECT *
FROM Table1
WHERE [LastName] not in (SELECT [LastName] FROM table2);

This is all destined for failure unless you can identify unique "people".

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Have you tried the Unmatched Query Wizard?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Thank you both. The tables are essentially the same. There is no way to tell who is who unless I use a concatenated key. I have first and last names plus their addresses. I was thinking of creating a composite key of their first and last name. I need to know who is in table1 but not in Table2. Thank you both so very much. I really and truly appreicate your input....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top