Saturday, February 25, 2012

Need help: With Dutch regional options, MS SQL Server BCP incorrectly delivers v

Hi all,

With Windows regional options are set to Dutch/Netherlands (or any other country using comma as the decimal symbol), MS SQL Server BCP Delivers incorrect figures to the target table.

The source table is a text file containing commas as the decimal character (As an example, in the text file 100.000 is represented as 100,000).

The target table is a Sql Server database table, with the column in question defined as a FLOAT datatype.

When BCP is run to deliver the data from the text file to Sql Server,
all figures are multiplied by 1000 because the input file for BCP contains a comma as the decimal symbol.

Thus, instead of the data being delivered with a value of 100, it ends up having a value of 100000

Is there anyone out there who is aware of any command line parameters that can be added to the bcp command in order to avoid this ? Note, the field in question is defined as SQLCHAR in the BCP format file.

Thanks for any help anyone may be able to offer.Second try on this one, does anyone have any possible suggestions ?

thanks again.|||What's the collation set to?

Mayb if you bcp the data to a staging table with a column a varchar then use replace?

Or divide by 1000 after the load?

Never had this problem

No comments:

Post a Comment