SSIS Loop - How to ?

I have a got a list of files in a folder text file with names like this:
baseFile_03_17_2017 .txt
baseFile_04_17_2017  .txt
baseFile_05_17_2017  .txt

Keep in mind>> there is no date column within each the text file.

 I want to a do a SSIS (SQL Server Integration Services)  loop where I loop through each file and insert it into a stage table which has an extra empty “Reportdate” column at the very end.

The SSIS job then gets the date from the file name and inserts it into the very last “ReportDate” column in that stage table

How do I do that?

Who is Participating?
Pawan KumarDatabase ExpertCommented:
You need to use the FOREACH LOOP CONTAINER to loop through the files. Basically we will just give the Directory path and using variables we loop.

You can follow this demo from -
Dung DinhDBA and Business Intelligence DeveloperCommented:
This expert suggested creating a Gigs project.
RayneAuthor Commented:
Thanks all, sorry I was out sick. Thanks for the help again :)
Pawan KumarDatabase ExpertCommented:
no problem. Glad to help as always :)
RayneAuthor Commented:
Pawan's  solution worked better for me. Thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.