sql 将值转换为ascii来排序
摘要:
--将后面两们字符转换为ascii值来排序select code,substring(code,1,len(code)-2)+CAST(ascii(substring(code,len(code)-1,1)) AS varchar(5))+CAST(ascii(substring(code,len(wbsNo),1)) AS code(5))from table1 where left(code,6)='030101' order by substring(code,1,len(code)-2)+CAST(ascii(substring(code,len(code)-1,1)) 阅读全文
posted @ 2012-12-26 16:26 汤尼 阅读(894) 评论(0) 推荐(0) 编辑