I have a rather large stored procedure that I’m working with, so I’ll only include the snippet that I’m concerned with:
QUOTENAME(isnull(NumberCount,'0'), '"'),
QUOTENAME( isnull(QualifiedCount,'0'), '"'),
QUOTENAME((isnull(RevenueAmount,'0')), '"'),
QUOTENAME(isnull(CurrencyAmount,'0'), '"')
In the output, all of the records that have a NULL value display with the expected value of ‘0’, except for the RevenueAmount column. That displays as ‘0.0’. This is because it was declared as NUMERIC(20,2). How do I get it to display a value of ‘0’? I thought setting an explicit value of ‘0’ in the isnull condition would take care of it, but it doesn’t.
Advice?
To display
"0"instead of"0.0"when RevenueAmount is0ornull: