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

x
?
Solved

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

Posted on 2009-05-18
8
Medium Priority
?
915 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.

688 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