dbTalk Databases Forums  

DTS package problem with decimal separator

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS package problem with decimal separator in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
IK
 
Posts: n/a

Default DTS package problem with decimal separator - 02-26-2006 , 04:37 PM






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




Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS package problem with decimal separator - 02-27-2006 , 02:58 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

Quote:
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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.