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
 Transact-SQL (2005)
 insert of data into data showing as NULL

Author  Topic 

osupratt
Posting Yak Master

238 Posts

Posted - 2009-05-20 : 20:03:17
i'm using the select * into script to create a table and insert data into sql from an excel file. this has always worked brilliantly for me in the past. i now have a file that when i do this some of the records are showing as NULL.

the formats are the same. i don't have a clue on what to do. i've been changing things around for the last several hours with it not working.

the column i want to not allow nulls. when i do this it gives me the null error. when the formats were changed on both front and back end it would give me the operand: float to text error. would anyone know how to proceed? thanks.

waterduck
Aged Yak Warrior

982 Posts

Posted - 2009-05-20 : 21:25:45
create a sto-pro with if-else statement? if is null, set variable = '-'
Go to Top of Page

osupratt
Posting Yak Master

238 Posts

Posted - 2009-05-21 : 10:21:33
I had to change the format of the column in my excel file that was pulling in NULLS to currency. Once in SQL i changed this to numeric and then refreshed and changed it to nvarchar. I really don't know why it didn't recognize some of these records, but the fix worked???
Go to Top of Page
   

- Advertisement -