Solved

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

Posted on 2009-05-18
8
912 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
[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
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
 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

 

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

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.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

630 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