SUM() restituisce dati strani
Salve,
Ho a disposizione un database non gestito dal sottoscritto.
Devo eseguire questa query
SELECT CDS_PAR, SUM(NMP_SCAD) FROM SCAD_D GROUP BY CDS_PAR
Dove i campi sono così definiti
CDS_PAR CHAR(16) Flags: BINARY ASCII UNICODE
NMP_SCAD DOUBLE Flags: Unsigned Zerofill
Alcuni record sulla tabella sono
PAR01 -575.21
PAR01 -19802.32
PAR01 575.21
PAR01 19802.32
PAR02 25140.34
PAR02 37.39
PAR02 -25140.34
La query mi restituisce come totale
per PAR01 come totale 9.09494701772928e-013 invece che 0
per PAR02 come totale 37.3899999999994 invece che 37.39
Questo mi accade su 200 record di totali su 10000
Dovrebbe essere un problema di arrotondamenti.
Come posso risolverlo?
Grazie
Subject
Views
Written By
Posted
SUM() restituisce dati strani
5097
December 12, 2007 05:12AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.