Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 NULL to Zero

Author  Topic 

Alaveh
Starting Member

24 Posts

Posted - 2011-10-13 : 10:55:14
Hi

i need a sql function to change NULL result to Zero .

for example : ABS(-x)=x
i need any thing like this : func(NULL)=0

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-13 : 10:57:08
COALESCE(field,0)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Alaveh
Starting Member

24 Posts

Posted - 2011-10-13 : 11:06:51
thank you very much visakh16
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-13 : 11:08:16
wc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -