cancel
Showing results for 
Search instead for 
Did you mean: 

SUM () function is rounding off the output value

0 Kudos

Hello, datatype is decimal and im using sum () function but output value is rounded off. precision and scale is at max based on my records (30,10)

i have a value -3.7080000000 and returned as -4.

HELP! i need the exact summation value not the rounded ones.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Looks like an issue of datatype rather than sum() function. What is the datatype of your target field/variable where you are storing sum ?

Ensure that your source & target datatypes are matching.

Sum() worked fine for me when my source and target fields both were of decimal(30,10) datatype and gave output -3.7080000000 instead of -4. If I changed datatype of target field to INT then it rounded off the value to -4.