select * from Tb
where 1=1 and IsNumeric(Tb.a) = 1 order by cast(Tb.a as int) asc
IsNumeric(Tb.a) = 1 ---->筛选字段a能转换为int类型的数据
order by cast(Tb.a as int) asc ------->将a转换为int类型进行排序