Subject | NUMERIC(18,2) problem |
---|---|
Author | Daniel Rail |
Post date | 2002-04-30T11:38:55Z |
Hi,
I'm using Firebird 1.0.0.796.
I have some fields defined as NUMERIC(18,2), but in the database they have
3 decimals and the third decimal sometimes has a value and this throws off
some calculations. The field definition is used for currency fields.
Here's an example:
The displayed value is $167.98, but the stored value is $167.975. Remember
it's supposed to be NUMERIC(18,2). And, I don't have a special formatting
to display and simply use the system defined format to show the data.
Anybody have an idea why it's being stored that way, instead of 2 decimals.
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)
I'm using Firebird 1.0.0.796.
I have some fields defined as NUMERIC(18,2), but in the database they have
3 decimals and the third decimal sometimes has a value and this throws off
some calculations. The field definition is used for currency fields.
Here's an example:
The displayed value is $167.98, but the stored value is $167.975. Remember
it's supposed to be NUMERIC(18,2). And, I don't have a special formatting
to display and simply use the system defined format to show the data.
Anybody have an idea why it's being stored that way, instead of 2 decimals.
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)