In the case statement below I expect the result to be blank when CM.Cost is NULL or = to .0000. But when CM.Cost = .0000, I get the value as 0%.
LA.Numerator isn't equal to 0, so that isnt the problem.
Any suggestions? or more info I could provide.
Thanks.
LA.Numerator isn't equal to 0, so that isnt the problem.
Code:
COALESCE(dbo.udfFormatPct(
(SELECT CASE WHEN CM.Cost IS NULL OR CM.Cost = .0000 THEN ''
ELSE CONVERT(varchar, (LA.Numerator/CM.Cost) * 100) END
FROM tblControlMaster CM
INNER JOIN @LoanAmount LA
ON LA.ControlID = CM.ControlID
WHERE LA.NoteID = N.NoteID), 0, 1), '')
Any suggestions? or more info I could provide.
Thanks.