Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • Last Modified:

SSIS Import Excel into a Varchar SQL Table

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
SQLSearcher
Asked:
SQLSearcher
  • 2
1 Solution
 
ValentinoVCommented:
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
 
SQLSearcherAuthor Commented:
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
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>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
 
SQLSearcherAuthor Commented:
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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now