Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2003
    Location
    Ottawa
    Posts
    105

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

    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.

  2. #2
    Join Date
    Jun 2003
    Location
    Ottawa
    Posts
    105
    Second try on this one, does anyone have any possible suggestions ?

    thanks again.

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    [sorry]

    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

    [/sorry]
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •