Different conversion results executing an SSIS package from command line and executing it from development studio

  • Hallo gents

    Today I've met a very strange problem. I made a package that import data into a all-varchar column temp table and used a conversion step in loading to another table from this temp table. In the conversion step, varchar values are converted into double-precision float (type of the target column). It runs fine when I execute it inside visual studio. However if I execute the same package on the same server using xp_cmdshell, the conversion fails to interpret the decimal points in the all-varchar column. For example, varchar value "27.2727" in temp table will be "converted" to float value 272727 in the target table if I execute this package in cmd line.

    Has anyone faced a similar problem before?

    Thanks in advance!

    Bazinga!

  • Maybe the regional settings on the server are different, so that a . is interpreted as a 1000-separator instead of a decimal separator.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • I agree that this is a region setting issue, because I've tested if I use my own account to run the sql server agent and execute this the SSIS job, it imports correctly (and I've reset the regional settings to the Amercian way). While the old sql agent service run by default local system account (under Dutch setting) always fails to interpret the comma ',' as a thousand separator.

    Bazinga!

  • sqlapprentice (12/21/2010)


    I agree that this is a region setting issue, because I've tested if I use my own account to run the sql server agent and execute this the SSIS job, it imports correctly (and I've reset the regional settings to the Amercian way). While the old sql agent service run by default local system account (under Dutch setting) always fails to interpret the comma ',' as a thousand separator.

    Als ik dit had geweten, dan had ik het wel in het Nederlands uitgelegd 😉

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply