Questions tagged [foreach-loop-container]

Questions about the SQL Server Integration Services (SSIS) "foreach loop container"

The SQL Server Integration Services (SSIS) "foreach loop container"...

...defines a repeating control flow in a package. The loop implementation is similar to Foreach looping structure in programming languages. In a package, looping is enabled by using a Foreach enumerator. The Foreach Loop container repeats the control flow for each member of a specified enumerator.

This is not for general questions about foreach loops. Besides, ForEach Loop Container differs from the For Loop Container: SSIS Foreach Loop vs For Loop Container

215 questions
40
votes
2 answers

rename-item and override if filename exists

I am trying to use the Rename-Item cmdlet to do the following: I have folder which contains "*.txt" files. Let's say 1.txt, 2.txt etc... I want to copy files that have some prefix, rename them to *.txt and override any existing files if there are…
Ilya Gurenko
  • 545
  • 1
  • 5
  • 16
20
votes
1 answer

SSIS Foreach Loop Folder as variable

I need to set the Folder in my Foreach loop to a variable location. I tried just adding the location to my package configuration, and it acted like it worked, but when I opened the configuration file, it wasn't there. I had it set to Foreach File…
thursdaysgeek
  • 7,696
  • 20
  • 78
  • 115
10
votes
3 answers

How do I programmatically get the list of MS Access tables within an SSIS package?

I have inherited a terribly written MS Access database that I need to import into SQL. The Access database has several thousand tables in it with field definitions that are identical. I have some experience with SSIS, and importing one table is…
Loki70
  • 613
  • 4
  • 15
  • 36
8
votes
1 answer

SSIS Result set, Foreachloop and Variable

I'm having an issue and I don't know if this is possible to do. I have a simple SQL task. SELECT Name, email FROM table_name Using a result set, I'm trying to pass it to a variable and use it on a email task with a foreach loop but i having no luck…
user3112621
  • 201
  • 1
  • 2
  • 5
8
votes
7 answers

How do I access the next element in for each loop in Java?

I am using a for each loop to visit each element of an array of Strings and checking specific characteristics of those Strings. I need to access the next element in this loop if the current one has shown the character desired. So the current on is…
Dilshad Abduwali
  • 1,388
  • 7
  • 26
  • 47
7
votes
1 answer

Java, Using Iterator to search an ArrayList and delete matching objects

Basically, the user submits a String which the Iterator searches an ArrayList for. When found the Iterator will delete the object containing the String. Because each of these objects contain two Strings, I am finding trouble writing these lines as…
Nayrdesign
  • 111
  • 1
  • 1
  • 2
7
votes
2 answers

SSIS Foreach Loop Container Not Looping through Excel Files

The Foreach Loop container in my process isn't pushing the new filename into the established variable. It loops through the process as many times as there are files that meet the criteria, I just need the file name to be dynamic. I have created a…
J. Sutton
  • 103
  • 2
  • 7
7
votes
1 answer

How to fix source is empty error in XML source while using Foreach loop container in SSIS 2012?

I have an issue with a very simple task in SSIS 2012. I have a for-each container that runs in FOR-EACH-FILE Enumerator mode. I want to read a target folder with XML files. The path to the folder is correctly configured. The files field is set to…
user1359035
  • 73
  • 1
  • 3
6
votes
1 answer

SSIS Foreach loop container dynamic file name and path , then unzip files

I have a folder having multiple files with the name as P04_20140326_1234.zip P04_20130324_58714.zip P04_20130808_jurhet.zip P04_20130815_85893.zip etc The name is in the format P04_systemdate_*.zip. I want to pick the folder containing currentdate…
user3466034
  • 107
  • 1
  • 1
  • 6
6
votes
1 answer

What is " rows in all the tables" in for each loop?

When setting up a for each loop to read products from an "objProduct" object variable, I got three options in "Enumerator Mode" pane as snapshot shows: I know "Rows in the first table" is the right option for current case. However, I'm curious in…
Echo
  • 1,117
  • 4
  • 22
  • 43
6
votes
1 answer

SSIS Exclude certain files in Foreach Loop Container

I have a SSIS package that loads csv files from a particular directory, using an expression and a wildcard for picking up all the files. Currently, the FileSpec of the container looks for all files with the following…
Christian Phillips
  • 18,399
  • 8
  • 53
  • 82
5
votes
4 answers

Exclude specific Sub Folders

I got a package that runs through a folder and it's sub folders to get client data. The agreement has changed and now the client will post his data in different folder name every time. I was wondering if I can do a foreach loop on the main folder…
5
votes
2 answers

SSIS Row Count For All Files Within a Folder

I have a folder which contains multiple Excel files that are replaced daily. I need a total row count that gives me the sum of row counts from each individual Excel file within the folder (i.e. if there are 3 files with 10 records each, I need a…
Alex
  • 107
  • 3
  • 8
5
votes
1 answer

c++: const_iterator and the for-each loop

I am making my own implementation of Vector in C++. This is a two part question. Part 1: When attempting to iterate through a Vector, my begin() and end() iterators are unable to handle the input arguments. Below is my entire Vector.h…
alex
  • 65
  • 1
  • 6
4
votes
2 answers

How to run two foreach loop inside one html table in Laravel?

I want to show two foreach loop data dynamically inside one table, but the design of the table break after dynamic loop data. My blade.php code is given below: …
Nazmul Haque
  • 720
  • 8
  • 13
1
2 3
14 15
Name Buy Rate Sell Rate