December 20, 2010 at 7:43 am
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!
December 21, 2010 at 12:27 am
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
December 21, 2010 at 4:39 am
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!
December 21, 2010 at 5:49 am
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