嗨,我在名为“ NumberName ”的字段名称中有这样的值
AB1
CD2
XH506
PQ104
PZ77
到目前为止,我尝试订购的是:
select * from view_name where NumberName='Something'
order by RIGHT('0000' + SUBSTRING(NumberName, ISNULL(NULLIF(PATINDEX('%[0-9]%',NumberName), 0),
LEN(NumberName)+1), LEN(NumberName)), 4)
和
order by LEN(NumberName),NumberName
如何实现这一目标..?