Query to cross reference two text fields and update data
Posted on 2005-02-25
I have some data in an excel spread sheet for staff addresses. I also have a SQL database table with staff information on and am trying to come up with an automated process to import the data.
So far I have moved the excel data to a new temporary database table with all the columns of the excel file. I simply copied the excel data into the tempory SQL table.
My Existing Staff database table and the temporary table contain the following fields:-
Forename, Surname AddressLine1,AddressLine2,AddressLine3,TownCity,PostCode
Since the temporary table does not contain address records for ALL members of staff in my Staff database table I am unable to simply run a sort by forename and surname to copy and paste data.
I beleive the best way to update the data would be to cross reference both the Forename and Surname fields on the two tables and then update the adress data in table StaffData from that contained in TEMPTABLE
Does anyone know an update query (or anything similar) thatI can run to achieve this?
Thanks for reading,