Exercise: Import an Excel songs list to SQL Server, converting data

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 ==> Data conversion transforms  (2 exercises)
Level ==> Relatively easy
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.

First go into SQL Server Management Studio.  Open the SQL file in the above folder and execute it, to get an empty table called MillionSellers:

Empty table

Hmmm ... I wonder what data type those silly owls have used for the Artist and Title columns?

 

Create a package called Song converter, and use this to try to import the Excel workbook of million-selling songs in the above folder into the SQL Server table that you've just created:

Data conversion error

You should now have an error - if you like, you can miss out this stage and go straight to creating the final answer.

 

Let your mouse hover over the red error icon and you'll see the nature of your problem:

String conversion error message

It's those pesky Unicode text strings!

Add a data conversion transform into your data flow so that you can successfully export the Excel workbook of songs to the SQL Server table:

Final data flow

What your final data flow task could look like.

 

Check that your package has added 123 songs into the SQL Server table, then close it down.

This page has 0 threads Add post