How to convert a string to integer using SQL query on SQL Server 2005?
You could use CAST or CONVERT:
SELECT CAST(MyVarcharCol AS INT) FROM Table SELECT CONVERT(INT, MyVarcharCol) FROM Table
2.1m questions
2.1m answers
60 comments
57.0k users