Note the following from

http://www.postgresql.org/docs/8.3/static/functions-aggregate.html

"It should be noted that except for count, these functions return a null
value when no rows are selected. In particular, sum of no rows returns null,
not zero as one might expect. The coalesce function can be used to
substitute zero for null when necessary."

So probably, the query should be modified according to COALESCE description
(?)

http://www.postgresql.org/docs/8.3/static/functions-conditional.html#AEN14484

regards,
Piotr
-- 
View this message in context: 
http://www.nabble.com/dbmail-2.3.5-expunge-operation-select-sum%28%29-failed-tp23366697p23366707.html
Sent from the dbmail dev mailing list archive at Nabble.com.

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://mailman-new.icns.fastxs.net/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to