Sunday, February 19, 2012

How to copy new values to a table

I have a table that I would like to add new values to only if those values are not already in the DB.

The table has one Name column which has a unique key, so I only want to insert records if the new value for the name is not already in the database.

I could send everything to a loading table and then delete the duplicate records on that loading table and then copy the remaining records to my final destination, but I think that there should be a cleaner way.

Johnhttp://blogs.conchango.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx

No comments:

Post a Comment