Exercise: Create a to-do list every Monday and copy it to a folder

This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

The answer to the exercise will be included and explained if you attend the Wise Owl course listed below!

Category ==> SSIS Integration Services  (18 exercises)
Topic ==> Controlling flow  (2 exercises)
Level ==> Average difficulty
Course ==> Integration Services
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Every Monday you import a list of tasks created for you by your kind manager into a flat file, and then copy this file to a working folder.  This exercise will help you create a package to automate this process!

The text file created

What the final text file created by the package should look like.

First, within Management Studio open the script called Create list.sql in the above folder, and run it to create a table of to do tasks.

Now create a package called I like Mondays.  Within this, create a variable to hold the weekday number:

Weekday number

This will hold the weekday number (1 is Monday, 2 is Tuesday, etc.).


Create a package to import the SQL Server table into a flat file (on Mondays only), then to copy this flat file to the Working folder subfolder of the above directory:

Final package

What the final package could look like.


You may find the following expression useful:  DATEPART( "dw", GETDATE() )

Test your package works (you may need to change the day of the week being tested to do this), then close it down.

This page has 0 threads Add post