Solved

# Sum of INTEGER VALUES in Query : result = Float ?!

Posted on 2005-04-11
230 Views
Hi, another strange thing:

Query:

SELECT Factuurartikel.Omschrijving, Factuurartikel.ArtikelgroepID, Factuurartikel.Code, SUM( Factuurartikel.Aantal ) AS som1, SUM( Factuurartikel.Volumepunten ) AS som2, Factuurartikel.Omschrijving, Factuurartikel.Datumverkoop, Temp1.Datum1, Temp1.Datum2, Temp1.Omschrijving
FROM "factuurartikel.DB" Factuurartikel, "temp1.DB" Temp1
WHERE  (Factuurartikel.Omschrijving = Temp1.Omschrijving)
AND  Factuurartikel.Datumverkoop BETWEEN Temp1.Datum1 AND Temp1.Datum2
GROUP BY Factuurartikel.Omschrijving, Factuurartikel.ArtikelgroepID, Factuurartikel.Code, Factuurartikel.Datumverkoop, Temp1.Datum1, Temp1.Datum2, Temp1.Omschrijving

in underlying tables: Factuurartikel: Aantal: INTEGER
Volumepunten: Double

Query: som1: TFloatfield    -----------> very strange : explanation ?
som2: TFloatfield

thx
Mario
0
Question by:marioway

LVL 27

Accepted Solution

som1: TFloatfield    -----------> very strange : explanation ?

sum is a db-inbuild-function, which returns allways a none integer-type.
this is absolute correct

meikl ;-)
0

Author Comment

Hi Meikl, thank you very much. Now I can sleep on both my ears.

Kind Regards
Mario
0

## Featured Post

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
how to add IIS SMTP to handle application/Scanner relays into office 365.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…