Código SQL:
Ver originalCREATE TABLE #temp
(
numero VARCHAR(20)
)
INSERT INTO #temp VALUES ('1')
INSERT INTO #temp VALUES ('11')
INSERT INTO #temp VALUES ('12')
INSERT INTO #temp VALUES ('100')
INSERT INTO #temp VALUES ('2')
INSERT INTO #temp VALUES ('20')
SELECT * FROM #temp ORDER BY numero ASC
numero
1
100
11
12
2
20
SELECT * FROM #temp ORDER BY CONVERT(INT,numero) ASC
numero
1
2
11
12
20
100
Saludos!