Solved

SSIS Import Excel into a Varchar SQL Table

Posted on 2015-01-14
4
207 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

920 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

16 Experts available now in Live!

Get 1:1 Help Now