Solved

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

Posted on 2012-04-02
2
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
ID: 37799537
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

707 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