How to do it...

  1. Open SQL Server Data Tools (SSDT) and create a new project using the Integration Services Project template. Place the solution in the C:\SSIS2016Cookbook\Chapter11\Solution folder and name the project AdventureWorksETL.
  2. Rename the default package UsingVariables.dtsx.
  3. Create a intCounter variable with data type Int32 and a default value of 0.
  4. Create a strFile variable of type String with the default value blank. Your Variables window should look like the following screenshot:
  1. Add a For Loop container to the control flow. Rename it LoopThreeTimes.

 

  1. Add a Foreach Loop container to the control flow. Rename it GetFileNames ...

Get Mastering SQL Server 2017 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.