Subject | RE: [firebird-support] Re: NUMERIC or DECIMAL? |
---|---|
Author | Chad Z. Hower |
Post date | 2004-10-23T00:39:49Z |
:: >Aah now you have me piqued. :) I have a LOT of 15, 2's are
:: those low
:: >precision?
::
:: Precision ranges from 0 to 18. Actually, a NUMERIC(15,2)
:: will be stored as a NUMERIC(18,0), i.e. a 64-bit integer.
:: Its scale is stored separately.
As long as its fixed - Im happy. As I said all calcs are done externally and
rouned to 2 points before returning when necessary.
:: >Actaully Im using this to store monetary values.
::
:: Fine for USD.
We are handling GBP, EUR, AUD, USD and others, but they all have similar
magnitude.
:: >All mathematics are done
:: >external to FB though, except an occasional sum.
::
:: Assuming it's Delphi or thereabouts, I guess you are using
:: BCD fields to
:: preserve the precision.
Its .net, we are using the decimal type but always dropping off at 2 digits.
Im not aware of BCD options native to .NET.
:: those low
:: >precision?
::
:: Precision ranges from 0 to 18. Actually, a NUMERIC(15,2)
:: will be stored as a NUMERIC(18,0), i.e. a 64-bit integer.
:: Its scale is stored separately.
As long as its fixed - Im happy. As I said all calcs are done externally and
rouned to 2 points before returning when necessary.
:: >Actaully Im using this to store monetary values.
::
:: Fine for USD.
We are handling GBP, EUR, AUD, USD and others, but they all have similar
magnitude.
:: >All mathematics are done
:: >external to FB though, except an occasional sum.
::
:: Assuming it's Delphi or thereabouts, I guess you are using
:: BCD fields to
:: preserve the precision.
Its .net, we are using the decimal type but always dropping off at 2 digits.
Im not aware of BCD options native to .NET.