SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS 2012: Split project Parameter string value and loop through split values


SSIS 2012: Split project Parameter string value and loop through split values

Author
Message
eseosaoregie
eseosaoregie
Mr or Mrs. 500
Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)

Group: General Forum Members
Points: 525 Visits: 1202
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.
eseosaoregie
eseosaoregie
Mr or Mrs. 500
Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)Mr or Mrs. 500 (525 reputation)

Group: General Forum Members
Points: 525 Visits: 1202
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search