Update Rows in SSIS OLEDB Destination

sql-server-2008, ssis

Solution

Well, found a solution to my problem; Updating all rows using a SQL query and a SQL Task in SSIS Like Below. May help others if they face same challenge in future.

update Original 
set Original.Vaal= t.vaal 
from Original join (select * from staging1  union   select * from staging2) t 
on Original.id=t.id

Problem

I have a data flow process where I have an OLEDB Source and an OLEDB Destination like below: Source merges data from two staging tables and returns a result set (say, 50K rows). These 50K rows are present in the destination table as well but are old data. ``` SELECT * FROM staging1 UNION SELECT * FROM staging2 ``` Generally, in the OLEDB destination we insert the returned dataset from the source to destination table, but in my case I have to update the old 50K rows with these new 50K rows. Kind of a bulk update. Can anyone please let me know how I can do that? I appreciate your help.

Original source