The below sql works:
DECLARE @VAL1 VARCHAR(50), @VAL2 INT
SET @VAL1 = '999'
SET @VAL2 = 6414
SELECT ROUND(CAST(((@VAL1 * 100.00)/@VAL2) AS FLOAT), 2)
Where as this one fails with 'Arithmetic overflow error converting varchar to data type numeric.'
DECLARE @VAL1 VARCHAR(50), @VAL2 INT
SET @VAL1 = '1000'
SET @VAL2 = 6414
SELECT ROUND(CAST(((@VAL1 * 100.00)/@VAL2) AS FLOAT), 2)
The only difference between the two is that in the second one @VAL1 value is 1000 instead of 999.