how to find the matching values?

polina

Registered User.
Local time
Today, 06:59
Joined
Aug 21, 2002
Messages
100
I have a spreadsheet that I have to import. It only includes last names. I have a table that includes last names and employee ids.
So what I have to do after I import the data, I need to run a query to find and assign all matching Employee IDs to the last names from the spreadsheet.

Please suggest the sql.

Thanks.
 
Hello

You have a potententially serious problem here.

I'll firstly explain the query.

In the query design view you can link the two tables using the names and then include the Id field in the query. Run as a make table query it will combine the excel table with the IDs in a new table, or add a new field in the excel table called Id and do an update query. That was the easy bit.

Secondly
The problem is you could have two John Smiths in your primary table with two separate IDs, when you do the link no- matter how you do it -Access will not know which John Smith is the correct one in the excel data, it could easily assign the wrong ID.

(unless you have no duplicate names of course!)

Chris
 
Last edited:

Users who are viewing this thread

Back
Top Bottom