Subject Re: [firebird-support] Problemas with SUM()
Author Martijn Tonies
Hi João,


> Hello, =)
> I am with problems SUM (). My Query returned NULL but my values is 10 and
> NULL. Why?

10 + NULL results into NULL.

If you want to exclude NULLs, do:

select sum(mycol)
from table
where mycol is not null


With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com