mardi 8 septembre 2015

SQL Server 2005 - updating many to one issue

I am trying to update a table from another staging table. The data is store employees. the problem is the unique identifier for the destination table (there is no PK) is a RSN# that does not match an RSN number in any other table. In the destination the combination of store id# and employee id# is unique but not in the staging table where there are people listed more than once with different titles, phone numbers, etc. for that store.

The problem I have is the file that is being used for the staging table is going to have many of the same records every time the import runs. So if there are 2 records for the employee each time it runs it will just toggle back and forth between the two records. I am not sure how to proceed.

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire