CAST((CAST(ftt.RANK as DECIMAL)/@topRank) AS DECIMAL(n,2)) as matchpercent,
...where n is a number large enough not to truncate left of the decimal point. That is to say, if you use "123.456", you need to use DECIMAL(7,2) because the total length is 7 digits.