Record flagged as insert when already exists in target

Comparing source and target databases - schemas and table names are different so had to manually map.  There is a record being included as insert that actually already exists in the target database and thus is raising a duplicate PK error on deployment.  The comparison field I've set is a unique surrogate key, while the actual PK is a parent key and a start date.  Regardless, the entire record appears to be identical between source and target.  There are no other records on either side that share the same PK as this record.

Why isn't this being raised as an identical update rather than an insert?  Makes me concerned about how the comparison is being made overall.
Tagged:

Answers

  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @BlairHughes,

    Thanks for your post!

    I believe including the Primary Key column in the comparison key should prevent this. Can I just check if there's a reason why you'd prefer not to include the PK?

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.