How to prevent SSIS from importing data from a file that already exist in database?

14,175

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

Share:
14,175
Admin
Author by

Admin

Updated on July 27, 2022

Comments

  • Admin
    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
    Admin about 12 years
    hi Diego, i change my question, if data exists, it should not load the data, that's it.