Search

Add scale property to a decimal variable in SSIS 2012 by Luciano Moreira

Active

1
0
Sign in
to vote
Type: Suggestion
ID: 780244
Opened: 2/28/2013 9:17:07 AM
Access Restriction: Public
0
Workaround(s)



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.
Details (expand)

Product Language

English

Category

Integration Services (DTS)

Proposed Solution



To avoid the workaround we should be able to set up the desired scale using properties window, to avoid changing the variable editor.

Primary Benefit

Faster Development

Other Benefits



No side-effects of not entering the correct number of decimal digits.

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 5/23/2013 at 1:07 PM
Hello Luciano. We’ve looked into this item. While it will not be addressed in the current release cycle, we have added it to a list for consideration for the next. Thank you for the feedback. We will keep track of the suggestion. -Walter A Jokiel, Program Manager, SQL Server (wajokiel@microsoft.com)
Sign in to post a workaround.