我是Oracle的新手,遇到了一个问题。我有一个名为file_id的列。
当我使用order by时,它会对字符串进行排序,例如:
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
谢谢你的帮助。
order by case when col is null then 2 else 1 end, regexp_substr(...
- DazzaL