Database Function Formula
Posted on 2007-04-09
I've been staring at this for some time and I can't figure out why I'm getting 0.000 for an answer.
I've tested my other code in my function and they are working great, it's just when I try to calculate my rating, it keeps returning 0.00.
I've gotten 578 for @TotalAttended and 2 for @TotalAcceptedRefunds, using the formula below, I should be getting back: 0.9965
/* Return 0, if there are no participants that have attended the course */
IF @TotalAttended > 0
SET @Rating = (@TotalAttended - @TotalAcceptedRefunds)/@TotalAttended
Anyone got an idea, what is wrong with my formula?