Solved

SSIS unable to import Excel data into table

Posted on 2014-09-08
4
569 Views
Last Modified: 2016-02-11
Hello Experts Exchange
I have a Excel file that I'm trying to import into SQL Server 2012 using SSIS.  The file looks fine but I'm unable to import data from the columns called "Overtime (hrs)" & "Late / Ely off (hrs)".

I have attached a sample file to show you the data, can anyone help me to get the data into SQL Server please?

Regards

SQLSearcher
Sample-Data.xls
0
Comment
Question by:SQLSearcher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 66

Expert Comment

by:Jim Horn
ID: 40309717
For starters, see if you can lose the ( ) / from the column headers.
Also, in the Excel connection eyeball what the data type is.

Also make sure that all of the columns can accept NULL values, and make sure that the number columns don't have any empty string '' instead of NULLs.

As an aside, it's a good practice to pump rows into a 'staging' table that has all varchar() column data types.  This provides the best odds that all rows will successfully make it into SQL.   Then you can execute T-SQL to verify that dates are dates, numbers are numbers, handle NULL values, etc. correctly before pumping into the final destination table.
0
 

Author Comment

by:SQLSearcher
ID: 40310118
Hello Jim

I tried to import the data into a staging table where all the columns where set as varchar and it came up with the error of;

Found 4 unknown column type conversion(s)
You are only allowed to save the package


How do I import the data by setting all the columns to varchar?

Regards

SQLSearcher
0
 

Accepted Solution

by:
SQLSearcher earned 0 total points
ID: 40332177
Hello Experts Exchange
I have solved the question myself, I had to change the data to text format.

I did this by gong into Excel select the column i could not import, then select data from the excel menu then select text to columns, and then select Next, then select next, then select text then click on finish.

Regards

SQLSearcher
0
 

Author Closing Comment

by:SQLSearcher
ID: 40338606
Solved question myself please see answer.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

695 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