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

barkome
barkome used Ask the Experts™
on
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?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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)

Author

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
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

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial