First a disclaimer. I am a new user of SQLITE and have not dug very deeply into the code and literature, so my question may be trivial.

I have a system from an emulation of a legacy commercial language processor which uses a very handy fixed point decimal number system. The numbers are of arbitrary precision and held in right justified display format. As you can imagine arithmetic on such numbers is not blindingly fast but for general commercial usage they are truly excellent. Commercial applications are not calculation intensive but are display intensive so the time saved in radix transformation and editing far exceeds the time lost in divisions.

This type of fixed point display format number with automatic rounding makes it very easy to produce reports which balance to the penny and incredibly easy to generate financial reports. Such a number type does seem to fit in with the SQLITE concept of loose typing, since it is actually just a text field.

There is actually an obscure ANSI standard which defines these numbers.

How feasible and how difficult would it be to add this type to SQLITE? The numbers store as text strings so what is involved is adding the new numeric type and inserting the arithmetic functions so that they are recognized by the SQL processor?

If anyone has a quick answer I should appreciate it.

PS, with such fixed point numbers you would have 5.0 / 2.0 = 2.5 exactly.

Reply via email to