score:2

Accepted answer

The SSIS variable designer did not, in my case, show the Decimal or Numeric data types to select to place my decimal(18,2) value into.

I changed my variable to Object, and was able to read the Decimal(18,2) value from the result set of one stored proc, and pass it as a parameter with type Money to a second SP.

So I would use "Object" if you cannot find a type in the variable list that works for you.

Read More

score:0

.NET decimal has methods decimal.ToInt64(), decimal.ToInt32() etc.

score:0

A float or a decimal would be my recommendation.

Similar Question and Answer

score:0

A SQL decimal(20,0) has a precision of 20 which equates to 13 bytes of storage. The .Net decimal is 16 bytes and should work.

score:0

You would need to convert the SQL data type to an Int64 prior to putting it into a Int64 package variable.

How are you getting it, as an output parameter?

In a dataflow, you would obviously read it into a decimal/numeric and then convert to Int64 in a Data Conversion component.

If you're trying to directly map an output parameter from an Execute SQL Command task, you'll probably have to use a temporary object package variable and then convert it in a script task into the real Int64 package variable.

score:1

SSIS does have Decimal and Numeric types. You can use either of these and it'll go through (except maybe on a Union All, where you should make sure they're the same precision and scale).

See more about data types here.

score:2

Have you tried Decimal yet?


More questions with similar tag