This is how to convert a string to number to an SQL Server sentence.

SELECT CAST(YourVarcharCol AS INT) FROM Table

examples

Convert to Integer
Select Cast(Customers.CodeId as Int) from Customers

Convert to a real
Select Cast(Customers.CodeId as float) from Customers