Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

excel file Import into a DB - Getting NULL Values instead of numeric data

Posted on 2009-05-18
8
Medium Priority
?
918 Views
Last Modified: 2013-11-10
Hi guys,

I am trying to import excel files using FEL -- The data in the file in a particular column is preceded by apostrophe like '5758585858 for few and without an apostrophe for few ...Now the Columns without an ' are coming in as NULL Values.. How to get the original values..

I have tried changing the extended properties as below with no luck..
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=NO"
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=YES"

Plz Help
0
Comment
Question by:danny1620
8 Comments
 
LVL 14

Expert Comment

by:Emes
ID: 24415860
this is excel pickyness.  Try to make the column a varchar and see what happens.

Not sure if this is the issue or not but it may be having trouble with ints and chars.

Try to also make it one field and make it work for that.  Then expand the data slowly so you can see any problems

0
 

Author Comment

by:danny1620
ID: 24416850
I did not get you.. But @ present the column is a Varchar
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24419989
Danny,
I think I was some time ago with a similar problem... could yo attach here a sample file?
Regards,
Pedro
www.pedrocgd.blogspot.com
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:danny1620
ID: 24422514
Hi Pedro...
I have atached the sample file.. I am concerned about the Corrected column and the Site Column.. As you see the corrected column has values as both text and number format .... I can change the Extended properties to get either the number or Text  ...but not both

Sample.xls
0
 

Accepted Solution

by:
danny1620 earned 0 total points
ID: 24498265
Hi

Below change in the Properties Worked for me

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=YES"

Thanks All
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24499077
<quote>
I have tried changing the extended properties as below with no luck..
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=NO"
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=YES"
...
Below change in the Properties Worked for me

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ******** ";Extended Properties="Excel 8.0;IMEX=1;HDR=YES"
</quote

:(
0
 

Author Comment

by:danny1620
ID: 24499906
I dont know why it did not work for the first time ... But did again..
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24502450
I knew it worked, but you had stated it did for you, that is why I saw no point in contributing.

It is covered in this article on DTS (but the same applies to SSIS):
Excel Inserts Null Values
http://www.sqldts.com/254.aspx
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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.

972 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