Главная страница | назад





Article #17990: A sum(if(...,...,0)) always returns 0

 Question and Answer Database

FAQ2990D.txt   A sum(if(...,...,0)) always returns 0
Category   :Quick Reports
Platform    :All
Product    :All 32 bit  

Question:
The following expression always returns 0 when using the QRExpr 
component in Delphi 3:

  Sum(if(Query1.CartonID = 'SI', Query1.Caliper, 0))

Why?


Answer:
Change the 0 to 0.0 and the Sum function will work 
as expected.


7/16/98 4:31:28 PM
 

Last Modified: 01-SEP-99