An importing tool put every column in several tables as varchar(max) and I am looking for the fastest way to convert the columns to the proper type.
This works fine,
Are the decimal separator of the system configured the same way as content from varchar field? In your case i will advice you to créate a new column(FLOAT) instead of alter existing column. Then fill that field with an update.
Here is a way to explicit convert text to float. IN SQL Server this query :
select cast(replace('12,5',',','.') as float)*2
Resutns 25 as response. That means is converted successfull to FLOAT
So to fill you new col with casted values you could do:
UPDATE Table SET FloatField=CAST(REPLACE(TextField,',','.') AS FLOAT)
That replace the , for . (In case there is any) and then converts to FLOAT. Hope this help.