Please read Update1 first! This is SSIS specific question.
I have the following tasks:
- I need to periodically move data from table A in MySQL to Table B in MsSQL.
- Then all of the moved rows needs to be updated in Table A (change a single column value).
I have accomplished task 1 by creating the following Data Flow: ADO NET Source -> Data Conversion -> SQL Server Destination. It's working great. I run this query X minutes.
Now, using SSIS tool, how do I update the rows that I just "Data Flow"'ed in MySQL? If I was to use a plain SQL I'd do (in MySql):
update table mytable set status="moved" WHERE ...
(this will make sure that next time task 1 pulls the data out - it skips all rows that were already "moved")
So the problem is that I don't know how to connect WHERE clause in the 2nd task with the resultset of the 1st task.
Update1: I'm not so interested in optimizing the update procedure. I have simplified it here to put emphasis on the the question: How to implement this in SSIS. I'm specifically interested in what kind of Data/Control Flow blocks in SSIS I need to use what is the sequence.