Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Problem with ROUND and SUM in the same query
Tue, Oct 19 2010 4:24 AMPermanent Link

Josselin

Hi,

I do this query with ElevateDB Manager :

SELECT Fournisseur, BtPx, Libelle, SUM(Q) AS Quantite, Pu, ROUND(SUM(Q)*PU TO 2) AS Total
FROM Edbtp
WHERE  LENGTH(Fournisseur)>0
GROUP BY Fournisseur, Btpx

There is no problem with this query.

Now, I do the same query in my application with a TEDBQuery component with the same data, in the result, the field "Total" is always NULL why ?

Thanks for your help

Bruno
Tue, Oct 19 2010 5:39 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Josselin


If you perform the same query in your app and EBDManager and there's a difference then there's a difference in one or more of:

the query
the data
the version of ElevateDB

It has to be like that because EDBManager is simply a Delphi application using ElevateDB. Nothing else.

In this case my bet would be on the fact that in the data used in your application has some nulls in it

Roy Lambert [Team Elevate]
Tue, Oct 19 2010 8:50 AMPermanent Link

Josselin

Roy

I verify that and I use the same version of ElevateDB (2.04 b4)

the query is the same ( I do a copy / paste )

the data is the same because I use the same DATABASE

Bruno
Image