[Zope] precision of values returned by ZSQL query

Jens Vagelpohl tommymi@concentric.net
Sat, 27 Nov 1999 16:58:18 -0500


hi everyone,

i found a strange behavior regarding values returned from a ZOracleDA ZSQL
query. maybe someone here knows how to get around it:


->table PAYMENT:

AMOUNT
------
5000
1.5

->query

select sum(AMOUNT) as total_cash from PAYMENT

i am getting 5001 in zope instead of 5001.5 and even applying formatting to
it like <dtml-var total_cash fmt="%.1f"> comes out to 5001.0, so i assume
the value must get truncated by zope or by the database adapter.

the same query in SQLPlus works as intended.

has anyone come against this and found a workaround?

jens