SQL Server: Error converting data type varchar to float
I have the following SELECT statement to calculate RADIANS and COS . SELECT COS(RADIANS(latitude)) as Lat FROM tbl_geometry; But I'm getting an error: Error converting data type varchar to float. My attempts: Attempt #1 : select Cos(convert(float, (Radians(convert(float, latitude))))) as Lat from tbl_geometry; Attempt #2 . select Cos(Radians(convert(float, latitude))) as Lat from tbl_geometry; Both attempts result in the same error. Note : column Latitude is of type varchar . Use try_convert() to find the invalid data: select latitude from tbl_geometry where try_convert(float, latitude) is