SSIS - Update flag of selected rows from more than one table

Posted by Rob Bowman on Stack Overflow See other posts from Stack Overflow or by Rob Bowman
Published on 2010-04-09T10:07:55Z Indexed on 2010/04/09 10:13 UTC
Read the original article Hit count: 322

Filed under:

Hi

I have a SSIS package that copies data from table A to table B and sets a flag in table A so that the same data is not copied subsequently. This works great by using the following as the SQL command text on the ADO Net Source object:

update transfer
set ProcessDateTimeStamp = GetDate(), LastUpdatedBy = 'legacy processed'
output inserted.*
where LastUpdatedBy = 'legacy'
and ProcessDateTimeStamp is not null

The problem I have is that I need to run a similar data copy but from two sources table, joined on a primary / foreign key - select from table A join table B update flag in table A.

I don't think I can use the technique above because I don't know where I'd put the join!

Is there another way around this problem?

Thanks

Rob.

© Stack Overflow or respective owner

Related posts about ssis