Thanks tamilselvan, I will try if I can use DECODE in there.
The problem is this is all over application and it will not be easy to change it. Also I had asked similar question long back relating to performance.. here is the link to it.

http://www.dbasupport.com/forums/sho...?threadid=8934

So as Jmodic has said..
"SUM ignores the NULL values and only sums the non-null values"

I was expecting NVL(Sum(col1),0) to work but it is giving error message at the customer site not here. They have Oracle 8.1.7.2.1 and we have Oracle 8.1.7 here.

ORA-24347: Warning of a NULL column in an aggregate function because it cannot handle NULLvalues in the column while summing up.

And then there is other issue when the select does not return any row.

Thanks
Sonali

[Edited by sonaliak on 10-29-2001 at 03:46 PM]