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
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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Solved question myself please see answer.
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.