Link to home
Start Free TrialLog in
Avatar of SQLSearcher
SQLSearcher

asked on

SSIS unable to import Excel data into table

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
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

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.
Avatar of SQLSearcher
SQLSearcher

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of SQLSearcher
SQLSearcher

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Solved question myself please see answer.