SQL Server 2008 - order by strings with number numerically

前端 未结 5 1449
感动是毒
感动是毒 2020-12-01 16:06

I have following values in my table:

ABC
ABC1
ABC2
ABC3 and so on...

ABC11
ABC12
ABC13 and so on..

ABC20
ABC21
ABC22 and so on..

So basic

5条回答
  •  广开言路
    2020-12-01 16:51

    You could adapt the function RemoveNonAlphaCharacters in this answer to filter out everything except numbers, and then use an ORDER BY using that function.

提交回复
热议问题