theevilone
IS-IT--Management
I have some SQL Server 2008 databases hosted on a remote server. One of the databases has an employee table with x number of fields. A customer has supplied me with an excel spreadsheet which contains a large number of number of employee details which need updating.
The Excel spreadsheet contains some but not all the fields in the remote database. As there is no unique identifier between the two, I will use employee email addresses as the unique identifier. What I need to be able to do is to write a SQL script which goes through a loop for each record in the spreadsheet and says if the email address matches the email address of a record in the table on the remote database, then update the details of the record with the details in the spreadsheet. But, without removing the other fields in the table, which should remain unaffected.
I hope that I have made myself clear. I would very much appreciate help on this. Gratitude and thanks in advance.
Best regards
The Excel spreadsheet contains some but not all the fields in the remote database. As there is no unique identifier between the two, I will use employee email addresses as the unique identifier. What I need to be able to do is to write a SQL script which goes through a loop for each record in the spreadsheet and says if the email address matches the email address of a record in the table on the remote database, then update the details of the record with the details in the spreadsheet. But, without removing the other fields in the table, which should remain unaffected.
I hope that I have made myself clear. I would very much appreciate help on this. Gratitude and thanks in advance.
Best regards