Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Getting NULL values when Import from Excel

Author  Topic 

JacobPressures
Posting Yak Master

112 Posts

Posted - 2009-05-15 : 14:21:24
I have a column called Grade. It contains the grades 1 to 9, P, and K. When using the Import wizard, I change the datatype from Float to VARCHAR. it imports my numbers 1 to 9 but NULLIFIES P and K. I don't know why it is doing that. To get around this, I've been saving it as a CSV file and importing it.

What can i do? Any ideas? Thanks!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-15 : 14:24:18
whats the type of grade in excel?
Go to Top of Page

JacobPressures
Posting Yak Master

112 Posts

Posted - 2009-05-15 : 14:40:38
Its in general now. but I've changed it to Text and I get the same results. I'm using 2007 by the way. I meant to mention that.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-16 : 03:05:49
are you using the correct connection manager?

http://www.sql-server-performance.com/articles/biz/How_to_Import_Data_From_Excel_2007_p1.aspx
Go to Top of Page

Eyespi20
Starting Member

10 Posts

Posted - 2009-05-28 : 14:18:44
My experience with Excel and mixed value columns is that you have to do a text-to-columns on the column in question and set it to text on the last step otherwise SSIS will return nulls when the data is either numbers or text depending on which it hits first even on columns that are formatted as text columns.

Margaret
    è¿é
Go to Top of Page
   

- Advertisement -