• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

SSIS Foreach Loop repeating itself more than once on a file.

Hello

I have a SSIS Foreach loop,and within it a Sequence Container that keeps looping over the same specified file more than once, thereby creating duplicates in the destination table.

Is there a way i can have to loop files within a folder just once, one-by-one?
0
barkome
Asked:
barkome
  • 2
1 Solution
 
Nakul VachhrajaniTechnical Architect, Capgemini IndiaCommented:
Do you move the file that has been processed to another folder?

Also, do confirm that the iterator is configured correctly and that the value fetched from the iterator is used in the tasks inside the ForEach Loop (e.g. maybe the loop may be iterating over 10 files correctly, but all the 10 times, the tasks inside the ForEach loop are referencing the same file due to some hard-coding)
0
 
barkomeAuthor Commented:
I do, but thinking of how to get the the ForEach loop to start with one file first, then begin with the second file
0
 
Nakul VachhrajaniTechnical Architect, Capgemini IndiaCommented:
Oh okay, I have attached a sample SSIS package that process files in a folder one by one.

(FYI - EE doesn't allow uploading DTSX files, so I have renamed it to XML. Request you to please rename it back to DTSX).
002A_FileRenameForMove.xml
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now