Exercise: Import all of the worksheets in a workbook into a table

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 course listed below!

Category ==> SSIS Integration Services  (40 exercises)
Topic ==> Looping over rows  (2 exercises)
Level ==> Harder than average
Course ==> Introduction to SSIS
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.

In Management Studio, open the SQL script in the above file and execute it to get this empty table:

Table of shopping

This is the table you need to populate, by adding rows for each of the worksheets in the Excel workbook in the above folder.

 

Create a new package called Loop over worksheets, and within this a variable:

New variable

It's vital that you give this variable a value equal to one of the worksheet names, otherwise you won't be able to create a data flow task later.

Now create a package which imports each worksheet's data:

Control flow for this package

The control flow for this package

 

Here's what the data flow will look like:

The data flow task

The data flow task.

 

The package should populate the ADO shopping table when it runs:

Final table

The first few rows of the final table (they won't necessarily appear in this order, though).

 

There's not much help given above!  Either refer to the courseware manual (if you're lucky enough to be sitting on a Wise Owl course), or refer to this blog otherwise.

When you've got this working, close the package down! 

This page has 0 threads Add post