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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Change data format

Author  Topic 

jung1975
Aged Yak Warrior

503 Posts

Posted - 2004-08-13 : 14:47:25
How do I change the data format by using a Active X script inside the DTS package?

I have a CSV file which has column A

A
--
231
231.10
130
135.98
.
.
.

Whenever I try to import it into Sql Server. The data format change to :


A
---
231.0000
231.1000
130.0000
135.9800


I want to figure out the way that I can change the data format to ####.## inside the DTS package by using a ActiveX script.

Can someone tell me how? or let me know if you have a better solution.




DustinMichaels
Constraint Violating Yak Guru

464 Posts

Posted - 2004-08-13 : 15:08:50
Have you tried using a decimal data type and have it use only 2 decimal places??

Dustin Michaels
Go to Top of Page

jung1975
Aged Yak Warrior

503 Posts

Posted - 2004-08-13 : 17:31:03
YES.

I tried a VB script (formatnumber) inside the DTS and it works ..



Go to Top of Page
   

- Advertisement -