[Zope] DCOracle/ZOracleDA not returning floats!!!

Karl Putland kputland@servicemagic.com
Thu, 3 Feb 2000 15:49:07 -0700


>>> sql = """select sysdate, 0.111, 1234.123456, 123, 1234,
(sysdate-to_date('2000-02-03','YYYY-MM-DD')) DateDiff from dual"""
>>> c.execute(sql)
>>> c.description
(('SYSDATE', 'DATE', 75, 7, 0, 0, 1), ('0.111', 'NUMBER', 40, 3, 0, 0, 1),
('1234.123456', 'NUMBER', 40, 6, 0, 0, 1), ('123', 'NUMBER', 40, 3, 0, 0,
1), ('1234', 'NUMBER', 40, 3, 0, 0, 1), ('DATEDIFF', 'NUMBER', 40, 22, 0, 0,
1))
>>> pprint.pprint(c.fetchone())
(dbiDate('2000-02-03 15:38:23'), 0, 1234, 123, 1234, 0)
>>>


A similar query executed through ZOPE has the same effeect.

 Z SQL Method at /db / prod / Oracle / Test_Junk

----------------------------------------------------------------------------
----
SYSDATE 0.111 DATEDIFF
2000/02/03 15:36:35 US/Mountain 0 0

----------------------------------------------------------------------------
----
SQL used:

select sysdate, 0.111, (sysdate-to_date('2000-02-03','YYYY-MM-DD')) DateDiff
from dual


----------------------------------------------------------------------------
----




The same query executed though ODBC returns the desired result

 Z SQL Method at /db / prodODBC / Oracle / Test_Junk

----------------------------------------------------------------------------
----
SYSDATE 0.111 DATEDIFF
2000/02/03 15:41:12 US/Mountain 0.111 0.653611111111

----------------------------------------------------------------------------
----
SQL used:

select sysdate, 0.111, (sysdate-to_date('2000-02-03','YYYY-MM-DD')) DateDiff
from dual


----------------------------------------------------------------------------
----


Please help.

-Karl