[Zope] Oracle and MAX

Theodore Patrick tpatrick@IndigoNetworks.com
Tue, 28 Sep 1999 11:44:27 -0500


We have had a similar problem with Oracle converting Integers to
Floating-Points.

All #'s in ORACLE would appear in DTML as (1.0) when a whole integer of (1)
was in the database.

We solved the problem by formatting the results on screen via DTML. I do not
think this will work in your case but here is what we did.

Here is the FORMATTING in DTML for REALS to INTEGERS

<dtml-var number fmt="%.0d"-->

I realize this is not exactly what you are looking for. Hope this helps.

Theodore E. Patrick

http://www.ishophere.com - Where do you shop?



-----Original Message-----
From: Dan Rusch [mailto:dgr427@gb.frontiernet.net]
Sent: Tuesday, September 28, 1999 9:55 AM
To: zope@zope.org
Subject: [Zope] Oracle and MAX


Has anyone used the sql MAX() with Oracle. We were using Sybase and
ported to Oracle and it seems that the MAX() in Oracle converts my real
numbers to integers this did not happen in Sybase, any thoughts? By the
way AVG() does the same

SELECT MAX("ItemNumber")
FROM SO_Items
WHERE "ServiceOrderID" = 1
AND "ItemNumber" < 2

The ItemNumber is a number(9,3) in the table SO_Items.

By the way the sql code works fine in sqlplus.




_______________________________________________
Zope maillist  -  Zope@zope.org
http://www.zope.org/mailman/listinfo/zope

(To receive general Zope announcements, see:
http://www.zope.org/mailman/listinfo/zope-announce

For developer-specific issues, zope-dev@zope.org -
http://www.zope.org/mailman/listinfo/zope-dev )