views:

75

answers:

1

I'm importing a flat txt file into SQL Server 2005 using SSIS. The problem is that negative numbers between -1 and 0 in the txt file are in a format without leading zero, e.g.:

-.15

If I insert such number into my database using plain INSERT syntax it works without complaining. However, SSIS reports an error if it encounter such number. If I change the number in txt file to:

-0.15

SSIS works correctly. Is this a known problem and is there any way to solve it without changing the values in the source txt file?

A: 

What is the data type on the flat file source side and what is the data type on the destination side? Have you tried using an explicit data conversion step? It sounds like an implicit conversion is occurring and it isn't working correctly, so explicitly setting the types may resolve the problem.

Registered User
It is float and I am using DT_R8 as a data type. As I already answered Tobias, the problem was caused by a different decimal separator in my regional settings. Thanks anyway for explicit data conversion hint - reading some articles about this option forced me to learn much more about SSIS.
Leo