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

Posted on 2005-04-11
Last Modified: 2010-08-05
Hi, another strange thing:


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

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 ;-)

    Author Comment

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

    Kind Regards

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    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…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now