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
 ISNull function

Author  Topic 

junior6202
Starting Member

45 Posts

Posted - 2014-12-11 : 13:20:46
I wrote the function below, I want o to replace Null in the results but it doesnt seem to work. any help will be appreciated.

SUM(ISNULL(CONVERT(float, Value), 0))

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-12-11 : 14:00:30
Looks correct to me. Show us some sample data that shows the issue.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

junior6202
Starting Member

45 Posts

Posted - 2014-12-11 : 14:30:25
Thank for the response Tara, I made a rookie mistake. The syntax is correct I was just applying it to the wrong SQL View.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-12-11 : 14:31:14


Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2014-12-11 : 17:08:04
Small item: You don't need the ISNULL logic; aggregate functions will ignore NULL values.



No amount of belief makes something a fact. -James Randi
Go to Top of Page
   

- Advertisement -