0

I have a scenario where I need to fetch data from Database 1 on Server 1 and insert into Database 2 on Server 2 on a particular condition.

I am using SSIS 2008.

  1. First I fetch an ID from Database 2 using Execute SQL Task.

  2. Then, I use the ID from step 1 and fetch a set of rows from Database 1 again using another Execute SQL Task

  3. I now want to insert these fetched rows back into Database 2.

I guess I should probably use a Foreach Container but I feel that there should be a better way to do the step 2 using a Data Flow Task`.

I know there is a way to pass parameters (ID) using Execute SQL Task but I cannot find a way to pass the the output of the Execute SQL Task (ID) as an input to the data flow task.

Is it possible? Or is there a better way to do what I am trying to achieve?

1
  • @Siva Where does that (extremely long) other answer you linked to, in any way address the question asked here? Specifically, how does it address the question of "How to pass a parameter to a Data Flow Task from an Execute SQL Task?" Commented Feb 26, 2013 at 19:07

1 Answer 1

1

Thanks RBarryYoung ! Thank You Siva for helping me out! I went through your post and it could be helpful in something I would be trying out next.

I found the solution I was looking for in the blog below :

and I put step 2 & step 3 within a single Data Flow Task.

http://geekswithblogs.net/stun/archive/2009/03/05/mapping-stored-procedure-parameters-in-ssis-ole-db-source-editor.aspx

Thanks! SA

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.