Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting NULL to numeric value (0)

Status
Not open for further replies.

renee35

MIS
Jan 30, 2007
199
Could someone please help me out. I have a report that returns "NULL" if the condition is not met, how do I have it return a "0" instead. I have tried using the Case statement and the convert function, but not sure what I am doing wrong. Thanks for any assistance with this!!

Thanks a bunch!!

-T
 
Hi T,

Instead of displaying the field that could be NULL, replace it by a formula.

IF ISNULL({table.field}) THEN
0
ELSE
{table.field}
 
Thanks a bunch!! Will this work also in SQL?

Thanks a bunch!!

-T
 
I haven't tested it in SQL but it should work as well. At the worst case, syntax may be a bit different (which I doubt) but the concept is the same. Good luck.

EC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top