Solved

how can we capture the itration in for eachloop container in ssis 2008

Posted on 2012-04-02
2
208 Views
Last Modified: 2012-07-05
hi

i am using the for each loop container to picup multiple tab delimted files to excel files

i need capture the each itaration value to one variable, i am going use this variable in some other places


Example: first itration  the variable should capture the 1
second time 2
third time 3..........etx

how can i do this
0
Comment
Question by:parpaa
2 Comments
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
Comment Utility
Do you mean how to capture the file name of the files in the loop?  Have a look at the Variable Mappings page of the ForEach Loop properties.  Specify a package variable (of type string) with index 0.  While looping, that variable will then contain the name (or path + name, depending on what you selected in the Collection page)

Or do you really need an increasing integer?  In that case, create a package variable of type Int32 and use a Script Task in your loop to increase it by 1.

More info: http://msdn.microsoft.com/en-us/library/ms141724(v=sql.100).aspx
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now