How to delete rows based on comparison from Data Flow Task in an SSIS?

Posted by vikasde on Stack Overflow See other posts from Stack Overflow or by vikasde
Published on 2010-05-28T19:07:07Z Indexed on 2010/05/28 19:12 UTC
Read the original article Hit count: 156

Filed under:
|

I have a DataFlow task with two OLE DB Source objects. This is the SQL I want to achieve using SSIS:

Insert into server2.db.dbo.[table2] (...)
Select col1, col2, col3 ...
from Server1.db.dbo.[table1] where [table1.col1] not in 
(Select col5 from server2.db.dbo.[table2] Where ...)

I am pretty new to SSIS and not sure how to achieve this. I thought I could do this using the Data Flow task and populating the first source with the data from server1.db.dbo.table1 and the second source with server2.db.dbo.[table2] and then do the conditional check before inserting it into server2.db.dbo.[table2]. I am not sure how to do the conditional check though. Any help is appreciated.

© Stack Overflow or respective owner

Related posts about sql

Related posts about ssis