SELECT
mi.documentno,
substring(mi.documentno,0,CHARINDEX('-', mi.documentno)),
substring(mi.documentno,CHARINDEX('-', mi.documentno)+1,len(mi.documentno))
FROM
某表名mi
where mi.documentno is not null
order by
cast(substring(mi.documentno,0,CHARINDEX('-', mi.documentno)) as int) asc,
cast(REPLACE(REPLACE(REPLACE(substring(mi.documentno,CHARINDEX('-', mi.documentno)+1,len(mi.documentno)),'+',''),'f',''),'a','') as int) asc
sqlserver制证列表排序
最新推荐文章于 2024-08-20 13:24:05 发布