Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS 2012: Split project Parameter string value and loop through split values Expand / Collapse
Author
Message
Posted Friday, March 1, 2013 2:33 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 7:04 AM
Points: 285, Visits: 1,079
I am currently working on an SSIS solution which employs a parent child design pattern. There is a Sql table which contains field that determine what packages should run. Currently I use a SQL task to load values into a ADO recordset and the use a foereach loop container to loop through the record set and execute the necessary package within the ForEach container.

I vaguely remember reading somewhere online (can't remember now) where it was suggested that you could use a project parameter to store the values as opposed to an Sql table. For example you could declare a project parameter as a string with a value like: value1;value2;value3;value4. I think you could then split the string based on the semi-colon separator. With the value split you can then use the Foreach loop container to loop through the values.

I find this solution much better as I can keep functionality within the SSIS framework. My question is how do you it? How can I split the project parameter and then pass the values to a ForEach container such that it can loop through the split values.

Post #1425402
Posted Saturday, March 2, 2013 2:09 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 7:04 AM
Points: 285, Visits: 1,079
I mananged to solve it b creating a script task and splitting the parameter into an array and loading the array into an object variable. Then using th ForLoop to loop through th object.
Post #1425835
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse