How to prevent SSIS from importing data from a file that already exist in database?
the correct term is not rollback. Rollback is when you insert something and undo your transaction. you should not insert the data if it already exists.
What you need is a lookup transformation between your DBSource and your DBDestination. This lookup should check if data exists on the destination table and, if not, insert it
Admin
Updated on July 27, 2022Comments
-
Admin almost 2 years
Everyday i load some csv data into my table. And my table has date column, now i need to use rollback function, such that, if the data already exists in my table it has to rollback, else it has to inserts based on my Asofdate parameter.
I know it is little confusing, let me be more clear.
my table has eid, ename, asofdate columns , now when i insert new file every day, it has to see whether that file is already existed in that table based on asofdate, if data exists, it should rollback the data.
-
Admin about 12 yearshi Diego, i change my question, if data exists, it should not load the data, that's it.