This is being done on 10g Enterprise Edition 10.2.0.4.0.
I have a table with three columns: key1 (varchar2(10)), key2 (date), and the_value (number).
There are no nulls in any of the columns.
When I try this:
SELECT key1, key2, SUM(ROUND(the_value)) AS total_value FROM the_table GROUP BY key1, key2;
I get a Numeric Overflow exception.
However, when I try:
SELECT key1, key2, ROUND(SUM(the_value)) AS total_value FROM the_table GROUP BY key1, key2;
it works.
Any ideas why the first one would not? I don't see what would cause the first one to have a numeric overflow or underflow while the second one would not.
-- Don