hi everyone,
i use isnull function to get a column in decimal data type, and i want to get the sum of it.
the syntax is as follows:
SELECT a.acct_no,
isnull(sum(b.revenue),0)
FROM table a, table b
the problem is, whenever there's a single null value in the column revenue, sum value is set to null. I tried to invert the function, i.e., sum(isnull(b.revenue,o)) but it also did the same thing.
i tried this isnull(b.revenue, 0) and it worked out fine. But what i need is the sum of the revenue column for every acct_no.
i hope you guys pictured out what i mean. all suggestions or solutions to this would be appreciated.
thanks
