Solved

SSIS unable to import Excel data into table

Posted on 2014-09-08
4
540 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
  • 3
4 Comments
 
LVL 65

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

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.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

757 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

19 Experts available now in Live!

Get 1:1 Help Now