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

variable looping Expand / Collapse
Author
Message
Posted Monday, February 18, 2013 8:18 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: 2 days ago @ 6:11 AM
Points: 60, Visits: 322
Hi all,
i have one ssis package which has to read file name from table and assign it to one object type variable.
but how to use for each loop container to loop through each file name in the object variable and read corresponding file to insert records into table.



thanks
Post #1421412
Posted Monday, February 18, 2013 9:14 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, May 16, 2013 3:45 AM
Points: 572, Visits: 1,157
Following link give you example of using foreach loop for ado

http://www.codeproject.com/Articles/14341/Using-the-Foreach-ADO-Enumerator-in-SSIS

Create an execute sql task that returns full resultset

You should first create a variable to hold the output of the loop.

In the data flow task you shoul create a flat file source,
you can use expression for source connection using the variable


-- Roshan Joe
*******************************************
Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help
Custom cleanup script for backups
Post #1421417
Posted Tuesday, February 19, 2013 1:46 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: 2 days ago @ 6:11 AM
Points: 60, Visits: 322
thanks joe
Post #1421475
Posted Tuesday, February 19, 2013 2:01 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, May 16, 2013 3:45 AM
Points: 572, Visits: 1,157
You are welcome.

-- Roshan Joe
*******************************************
Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help
Custom cleanup script for backups
Post #1421480
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse