Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SSIS unable to import Excel data into table

Posted on 2014-09-08
4
Medium Priority
?
600 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

715 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