Reputation: 65
I created a simple package that imports from Excel into SQL Server. Is there a way to add a script to this package to look into the SQL table and make sure a value from the excel doesn't already exist before it adds the data? Basically, I have someone inputting data into Excel and i will run this job throughout the day to update a table I built. I just don't want dupes. Thanks!
Upvotes: 1
Views: 82
Reputation: 5208
You can run your Data Flow Task through a Lookup component, setting your no matching entries handler ('General' tab) to 'Redirect rows to no match output', and then import only the 'no match output' into SQL Server.
You could also put a constraint on your SQL Server table to further secure it from dupes.
Upvotes: 1