Using SQL to convert a string to an int is used in a variety of situations. You may have text data that you cannot alter at the source and you need to get some accurate answers from it. You may also have text data that you want to insert to an integer column. There could be other reasons too. There is an easy solution to this and I will show you examples in both SQL Server and MySQL. How to Convert a String to Number Using T-SQL in SQL Server Let us create some data first to demonstrate this: If I create some data like the following and then try to order it from lowest number to … [Continue reading]