all groups > sql server dts > february 2006 >
You're in the

sql server dts

group:

DTS package problem with decimal separator


DTS package problem with decimal separator IK
2/26/2006 11:37:59 PM
sql server dts:
Hi!
I'm have a DTS package that imports a text file into a SQL 2000 db. My
problem is that one of the fields in the text fil contains a price with
comma as decmal separator.
The text file:
ArtNo;Name;Price
1;Name1;1,5
2;Name2;2,5
3;Name3;4
4;Name4;5
5;Name5;75,35

In the SQL table the Price col is defined as Float.

When I import the file, the price value in SQL is transformed to:

ArtNo;Name;Price
1;Name1;15
2;Name2;25
3;Name3;4
4;Name4;5
5;Name5;7535

My regional settings states Comma as decimal separator.
Any suggestions how to avoid this transformation?

Ingar


Re: DTS package problem with decimal separator Allan Mitchell
2/27/2006 12:58:32 PM
Hello IK,

Pass the value as a string and in an Active Script replace the comma with
a full stop

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

[quoted text, click to view]

AddThis Social Bookmark Button