i want to convert a string field to integer using sql query?
+8
A:
You could use CAST or CONVERT:
SELECT CAST(MyVarcharCol AS INT) FROM Table
SELECT CONVERT(INT, MyVarcharCol) FROM Table
CMS
2009-04-08 07:13:15