SUM overflows
When using SUM() on a large table (1 billion rows), it overflows without warning me: dbadmin=> select SUM(sales) from schema.fact_table; SUM ----------------------- -8083921422909.855574 (1 row) dbadmin=> select SUM(CAST(sales as NUMERIC(30,8))) from schema.fact_table; SUM ------------------------- 10362822650799.69604200 (1 row) dbadmin=> The documentation says SUM should throw an error if that happens. Is this a bug? Or am I missing something?
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.