Subject Re: [firebird-support] Re: NUMERIC and DECIMAL
Author Ann W. Harrison
Thomas Miller wrote:
>
> Isn't this a bug???? NUMERIC should never store more precision. No
> wonder SUM never works.

Certainly the standards says that a NUMERIC field should never accept a
value larger than the specified precision. And here's a recent test
done on a dialect 3 V2.0 database:


SQL> show table foo;
F1 NUMERIC(3, 2) Nullable
F2 NUMERIC(6, 2) Nullable
F3 NUMERIC(10, 3) Nullable
F4 DECIMAL(3, 2) Nullable
F5 DECIMAL(6, 2) Nullable
F6 DECIMAL(10, 3) Nullable
SQL>
SQL> insert into foo values (
CON> 10.01, 10101.01, 10101010.001,
CON> 10.01, 10101.01, 10101010.001);
SQL> commit;
SQL> select * from foo;

F1 10.01
F2 10101.01
F3 10101010.001
F4 10.01
F5 10101.01
F6 10101010.001

But why do you say that behavior affects SUM?

Cheers,


Ann