-1

I have a table and want to loop thru each rows.

select tablename from TableX

  1. Created the Execute SQL task
  2. Added the Foreach loop container.

So now I need to check the tablename and based on that I need to take action.

For example - when it returns "Tab1" called the Data Flow Task T1 when it returns "Tab2" call the DFT T2 and so on.

I am having trouble checking the value for tablename and calling the corresponding Data Flow Tasks.

Please help. ramamosn

1 Answer 1

0

if you have table names in table TableX.

1 Create record set

2 use for each loop and iterate throw result set and set veritable

3 Put all data flow inside loop container set variable vale to tablename .

4 Expression set the properties Disable and expression variable value <> to table name .

below is sample link for record set

http://www.select-sql.com/mssql/loop-through-ado-recordset-in-ssis.html

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.