Quote:
Originally Posted by db2girl
In this example, customer thinks scale !=0 is incorrect:
"Correct" result:
444444444444444.00
"Incorrect" results:
444444444444444.50
444444444444444.10
In their case, the column is defined as dec (31,2) - 1st example.
|
I might be wrong as I've had a couple of beers now, but the FLOAT literal 4.4444444444444444E14 seems to be the same as 444444444444444 plus something around 0.44 (floating point numbers are approximate), which nicely fits into DECIMAL(31,2), so 444444444444444.00 would definitely be incorrect, z/OS or not.
Now, JDBC Double supports only 15 digits for the mantissa, which does not mean that it would truncate the extra digits - rather, if you supply more than 15 digits for the mantissa (which they do) only the first 15 will be defined.
Can your customer explain why they think 444444444444444.00 is the correct decimal representation of 444444444444444.44?
Normally you would never use floating point data type for currency (money) variables - only decimals.