Re: [HACKERS] Datatype MONEY
Re: [HACKERS] Datatype MONEY
От:
Michael Robinson <robinson@netrinsics.com>
Дата:
wieck@debis.com (Jan Wieck) writes: > In some countries (Germany at least) storage of financial > booking information is not permitted to use floats. And you > aren't allowed to use it for calculation of taxes etc., > instead you must use some datatype with a fixable number of ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > digits after the decimal point. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *AND* with correct rounding behavior for the least significant digit (which may not be displayed, as with the U.S. "mil"--one tenth of a cent). -Michael Robinson P.S. I like the idea of a money type with an internal field for the ISO currency type. For all my current applications I have to break that out as a separate char(3) field (USD, HKD, JPY, RMB, etc.).