Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 527461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:53:06+00:00 2026-05-13T08:53:06+00:00

Please read Update1 first! This is SSIS specific question. I have the following tasks:

  • 0

Please read Update1 first! This is SSIS specific question.

I have the following tasks:

  1. I need to periodically move data from table A in MySQL to Table B in MsSQL.
  2. 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:53:07+00:00Added an answer on May 13, 2026 at 8:53 am

    I find that the easiest is to have an intermediate status like:

    0 = not moved, 1 = scheduled to move,  2 = moved
    
    • So you first flag rows at source with status = 1
    • Then move those rows over
    • When transaction succeeds, UPDATE myTable SET status = 2 WHERE status = 1

    AFTER YOUR UPDATE:

    You could use Multicast just before your destination and capture IDs of records transferred over into another table CapturedRows in the source DB. After that use Execute SQL Task to update rows in a source table, like:

    UPDATE myTable SET status = 'moved' WHERE ID IN (SELECT ID FROM CapturedRows)
    

    After this you would use another Execute SQL Task to truncate the CapturedRows table.

    You could also connect OLE DB Command to the Multicast directly, to update records one by one, as they flow — but that would be quite slow.

    To use this, you would have to set Fail Package On Failure for the Data Flow Task to make sure that it stops if an insert fails and Transaction Option for package to required and for the Data Flow to supported.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my homework, but please read my problem description first. I have to
this is my first question, so please, bear with me. I have a Swing
Please read my update at the end of question after reading the answers: I'm
please read carefully because my english is not good, and the question has not
Before jumping on me, please read my question carefully :D. I know there are
I am curious to know why this is happening. Please read the code example
(please read the update section below, I leave the original question too for clarity)
First of all, I have read the similar posts and don't see how they
In Reference to this question After getting the line identifier matching in first and
Hey folks, this question can't be too complicated. Please provide a solution to at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.