SQL Oracle排序字符串(数字)和(带数字的字母)

我是oracle的新手,我遇到了问题.
我有一个名为file_id的列.

当我按顺序排序时,它会排序

1
1 
10 
100 
11 
11
110 
114
12
300 
31
4200
B14
B170
B18

编辑:
我希望这样排序.

1
1
10
11
11
12
31
100
300
4200
B14
B18 
B170

下面的答案非常有效.只有我遇到的其他问题..我的记录是空白的.我怎么能在最后制作空白记录?

1 
1 
10 
11 
11 
12 
31 
100 
300 
4200 
BLANK 
BLANK 
BLANK 
BLANK 
BLANK 
B14 
B18 
B170

感谢您的帮助.

解决方法

select column 
from table
order by 
  regexp_substr(column,'^\D*') nulls first,to_number(regexp_substr(column,'\d+'))

fiddle

相关文章

SELECT a.*,b.dp_name,c.pa_name,fm_name=(CASE WHEN a.fm_n...
if not exists(select name from syscolumns where name=&am...
select a.*,pano=a.pa_no,b.pa_name,f.dp_name,e.fw_state_n...
要在 SQL Server 2019 中设置定时自动重启,可以使用 Window...
您收到的错误消息表明数据库 'EastRiver' 的...
首先我需要查询出需要使用SQL Server Profiler跟踪的数据库标...