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)
 import of numeric values from csv

Author  Topic 

bunkscene
Starting Member

2 Posts

Posted - 2004-04-15 : 11:02:13
Hi. I have a problem importing numeric values from a CSV file into a SQL database using DTS. INTs seem to work fine but decimal or float numbers do not import at all. I get "General Conversion Error" and the DTS fails. Do I really have to write my own transformation code to import decimals? Or am I just overlooking soemthing stupid? Thanks.


Dave

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2004-04-15 : 11:06:59
No conversion code is needed, I import decimals all the time.

You might want to double check the data type for your decimal columns - confirm that they can accomodate the data from the input file.

Perhaps you should also check that the data sent in the csv file is valid numeric data. To check this in testing you can first import the data into a varchar field and run a numeric test (isnumeric).



Duane.
Go to Top of Page

bunkscene
Starting Member

2 Posts

Posted - 2004-04-15 : 11:26:53
It was something stupid. Null values in the csv are represented as "" instead of nothing. Thanks for the help.
Go to Top of Page
   

- Advertisement -