When you add a decimal variable to you SSIS 2012 package, SSIS will infer the scale from its initial value. Since the designer puts “0” as the default value, the actual data type is DECIMAL(29,0). So if you use an expression task with the following expression “ @[User::vDecimal] = 43.75 / 3 “ the resulting value will be “14”.If you set the initial value for the variable to 0.0001 the expression will evaluate to “14.5833” since now It’s a DECIMAL(29,4). But if I try to force 0.0000 as the default value, since I don’t want to initialize my variable to anything but zero, the actual data type will be DECIMAL(29,0). Workaround: to make it work properly I have to declare the default value as 0.0001 and set the correct value (zero) at package startup.
Product Language
Category
Proposed Solution
Primary Benefit
Other Benefits
Virtualization
Please wait...