Solved

SSIS Import Excel into a Varchar SQL Table

Posted on 2015-01-14
4
205 Views
Last Modified: 2015-01-19
Hello Experts Exchange
I have a Excel spreadsheet (Please see attached) that I'm trying to import into SQL Server but I'm having a nightmare trying to do it, everything I have tried has failed.

I have followed the instructions on this web page but it did not work.
http://www.mssqltips.com/sqlservertip/1393/import-excel-unicode-data-with-sql-server-integration-services/

Several of the columns come back with the error of;
Column "Tool Code" cannot convert between Unicode and non-Unicode string data types.

Can anyone help me to create a SSIS package that will import the data into SQL Please?

Regards

SQLSearcher
MOULD-DIE-CHARTS-14-15.xls
0
Comment
Question by:SQLSearcher
  • 2
4 Comments
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
ID: 40548668
You can have SQL Server, well, Management Studio to be exact, generate the SSIS package for you by using the Import Data wizard.  If you don't need support for unicode characters then I recommend to use varchar (not nvarchar) for all string columns.

Have a look at the following article for the steps involved and what to keep in mind: Importing Excel Data Using Integration Services
0
 

Author Comment

by:SQLSearcher
ID: 40548993
Hello ValentinoV
I have tried to follow your instructions but when I get to the Review Data Type Mapping it says;
Found 4 unknown column type conversion(s)
You are only allowed to save the package

I have two data types DateTime and Varchar for everything else.

The problem fields are;
Job No
Bay No
Week No
Job Link

How do I solve this problem?

Regards

SQLSearcher
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40551136
>Column "Tool Code" cannot convert between Unicode and non-Unicode string data types.
Have you tried adding a Data Conversion Task to convert these columns to (or from) Unicode?
0
 

Author Comment

by:SQLSearcher
ID: 40557217
Hello ValentinoV
After saving the SSIS package I was able to open in BIDS and then run the package OK.

Regards

SQLSearcher
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now