I am running following query using Aqua Studio 4.1/AS400 DB2
select sum(amount) from table1
amount column is a decimal(11,2)
I am expecting a numeric total with 2 decimal points but my result
looks like this 5.8801792972E8 (float?)
I tried:
select sum(cast(amount as decimal(12,2)) from table1
select cast(sum(amount) as decimal(12,2)) from table1
and got the same results.
This appears to be something pretty basic that I am missing. Any
suggestions?
Thanks!