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
 General SQL Server Forums
 Data Corruption Issues
 DTS Import Error

Author  Topic 

starnold
Yak Posting Veteran

83 Posts

Posted - 2008-01-23 : 10:46:46
I have created a DTS to import some data into a table. It is importing a tab delimited text file and I am getting an error when importing into a decimal field.

I have imported the data into a table with all the fields as varchar. The reason that I am getting this error is that the column that is giving me the errors is trying to populate the cells with a " " when there is no information!

Is there anything that I can do in order to treat that as a null?

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-01-23 : 22:06:35
What's data source? Possible to clean it up?
Go to Top of Page

vaneycks
Starting Member

1 Post

Posted - 2008-01-30 : 17:38:10
I have imported the data into a table with all the fields as varchar. The reason that I am getting this error is that the column that is giving me the errors is trying to populate the cells with a " " when there is no information!

Is there anything that I can do in order to treat that as a null?
[/quote]

Check out the NULLIF function. SELECT NULLIF(my_col, '') will return NULL if my_col is an empty string. I used this to get around a similar when problem bcp'ing in data.

Go to Top of Page
   

- Advertisement -