dbTalk Databases Forums  

Transforming data from Excel to SQL Server...

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Transforming data from Excel to SQL Server... in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael McMurtrey
 
Posts: n/a

Default Transforming data from Excel to SQL Server... - 07-10-2003 , 04:39 PM






Hi all,

Thanks for your help in advance.

The problem that we are having is that when we try to
transform text data from Excel to a varchar in SQL Server
numeric values are transformed as Null values. For
example if the Excel dataset is like below the numeric
values are copied as Null values:

Id Value
1 TestValue1
2 TestValue2
3 3
4 4
5 TestValue5

So for example the data that is copied to SQL Server ends
up as:

Id Value
1 TestValue1
2 TestValue2
3 NULL
4 NULL
5 TestValue5

The Id column is text as well and all the numeric values
are transformed with no problem.

Again, thanks for your help,

Michael


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Transforming data from Excel to SQL Server... - 07-11-2003 , 01:21 AM






The answer is contained in this article

Excel Inserts Null Values
http://www.sqldts.com/default.aspx?6,222,254,0,1

--


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Michael McMurtrey" <mmcmurtrey (AT) hotmail (DOT) com> wrote

Quote:
Hi all,

Thanks for your help in advance.

The problem that we are having is that when we try to
transform text data from Excel to a varchar in SQL Server
numeric values are transformed as Null values. For
example if the Excel dataset is like below the numeric
values are copied as Null values:

Id Value
1 TestValue1
2 TestValue2
3 3
4 4
5 TestValue5

So for example the data that is copied to SQL Server ends
up as:

Id Value
1 TestValue1
2 TestValue2
3 NULL
4 NULL
5 TestValue5

The Id column is text as well and all the numeric values
are transformed with no problem.

Again, thanks for your help,

Michael




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.