SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Package calling other package and passing back the
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

aakcse
Aged Yak Warrior

India
570 Posts

Posted - 06/12/2014 :  23:43:05  Show Profile  Reply with Quote
I have to loop through n number of package from a master package, any idea how to implement this?

Master package Calling child package in for each loop , here I need to loop through n no or rec from a table and each record needs a call to child package and return control back to calling pkg.. need to do this till the end of all the records in a table.

Child package1 -- Called perform some task and return control back to master package

Child package2 -- Called perform some task and return control back to master package

Child package n -- Called perform some task and return control back to master package

Thanks

-Neil

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 06/21/2014 :  06:09:21  Show Profile  Reply with Quote
you can set it up using below work flow
1. Have a execute sql task which will execute query and store the result in a recordset variable created in SSIS
2. Have a for each loop with ADO enumerator pointing to the recordset variable to iterate through the values in the resultset. Use other variables with corresponding datatypes to get individual values out within the loop
3. Add a execute package task inside loop and map the variable with package path to connection string property to execute the corresponding child package.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000