Our approach to that problem was to write a library of ASCII decimal
arithmetic functions, store the data as underlying type TEXT but give
them a declared type of DECIMAL(n,m) and have added functions which
understand that declared type. With that addition Sqlite becomes useful
for accounting and other such activities requiring arithmetic accuracy.
For a simple display interface we use display format, fixed point
decimal numbers, right justified.
Mag. Wilhelm Braun wrote:
Dear all,
I use sqlite to store numerical text strings.
Why do I use text type: because of the float problem of incorrection.
example in numeric Columns: 3.2009 returns as 3.2008999999999999
which is not what I want.
Column Type=TEXT
is there a way to do comparison of text in a numerical way.
EXAMPLE rows:Column txt
"0.200899"
"1.2009"
"113.2008999"
"4.0"
"3.1"
SELECT max(txt) FROM test
should return "113.2008999" and not "4.0"
ALSO:
SELECT * FROM test WHERE txt>10.0
should just return "113.2008999" and not
"113.2008999"
"4.0"
"3.1"
so my question is there a way to do that correctly?
Thanks for any helpful hints
regards W.Braun
by the way: I use pysqlite.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------