verify whether the row exist or not

  • Hi

    I am importing data from XML source to Sql server database using SSIS.

    While importing, I want to check whether the current row already exist in my local database(sql server) or not. I want to insert only the new rows. If already exist, I want to update.

    How can I do this. How can I design this task?

    I am new to SSIS

  • I have resolved that by using a lookup component to determine existence and adding a set value to the pipeline (usually a new column with the value 1), for records that don't exist the value is not important, but it won't be 1.. I then use a conditional split on that new column, for records that have a value of 1 I shunt it off to a different path to handle the update, and I let the other records follow the default path down to the insert. Keep in mind you cannot use transactions with this, the insert and update WILL conflict since they are not in the same transaction. I ran into that problem.. your performance on the insert will probably be pretty fast, but the updates will be row-by-agonizing-row..

    CEWII

  • You need to use lookup component or SQL procedue to peform this task

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply