Error converting data type varchar to floatUnder certain conditions, if you try to convert or cast a variable to Float you might get the below error message:
"Error converting data type varchar to float."
Most probably you are getting this error message because the variable you are trying to convert is "not qualified" for the conversion.
In order to better understand, consider the following example:
DECLARE @tmpValue VARCHAR(20);
--Try to cast the variable to FLOAT
SELECT CAST(@tmpValue AS FLOAT) AS ConvertedValue;
Msg 8114, Level 16, State 5, Line 6
Error converting data type varchar to float.
Resolution: Correct the variable's value and try to cast/convert it again.