Monday, March 26, 2012

ForEach DataFlow Task

I want to be able to loop through a view and execute a dataflow task for each record. I would like to pass the value of a column to the dataflow task to be used as a parameter in a data reader.

How can I do this?

Danny Crowell wrote:

I want to be able to loop through a view and execute a dataflow task for each record. I would like to pass the value of a column to the dataflow task to be used as a parameter in a data reader.

How can I do this?

I don't understand...could you clarify it?

What do you mean with 'loop through a view'? or you mean the rows in a view?...Then how is that you want t pass a column as parameter?

|||

Danny Crowell wrote:

I want to be able to loop through a view and execute a dataflow task for each record. I would like to pass the value of a column to the dataflow task to be used as a parameter in a data reader.

How can I do this?

Load an Execute SQL task with the SQL for the view into an OBJECT-typed variable. Then, using a foreach loop against that ADO recordset, you can grab a column and stick its contents into another variable that you can use in the foreach loop-contained data flow.|||Here is an artilce from Brian Knight that helped me with this.
http://www.whiteknighttechnology.com/cs/blogs/brian_knight/archive/2006/03/03/126.aspx

No comments:

Post a Comment