Access Code
iif(Format(SUM(Field))='',0,SUM(Field))
SQL code
IsNull(SUM(Field),0) As Amt
In the Access Code statement it is clearly shown that the query has to run SUM function 2 times to get SUM and 0 if records are blank.
But I want to know that internally how many times SQL is running SUM function in the SQL statement? 1 or 2? Please provide some explanation.