oracle PL/SQL:对行进行排序 [英] oracle PL/SQL: sort rows
本文介绍了oracle PL/SQL:对行进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我运行查询的顺序为,但我的列不是想要输入的顺序
I run a query with a order by but my column is not the order a want to be in
我想要这样:
PROD_1
PROD_2
PROD_3
PROD_4
PROD_5
PROD_6
PROD_7
PROD_8
PROD_9
PROD_10
PROD_1
PROD_2
PROD_3
PROD_4
PROD_5
PROD_6
PROD_7
PROD_8
PROD_9
PROD_10
但这给了我
PROD_1
PROD_10
PROD_2
PROD_3
PROD_4
PROD_5
PROD_6
PROD_7
PROD_8
PROD_9
PROD_1
PROD_10
PROD_2
PROD_3
PROD_4
PROD_5
PROD_6
PROD_7
PROD_8
PROD_9
推荐答案
您将需要为每个位置添加0,例如数字1-99的01或1-999的001.否则,您将必须拆分数值并在两个不同的列上进行排序.
You'll either need to add a 0 for each position such as 01 for numbers 1-99 or 001 for 1-999. OR you'll have to split out the numeric values and sort on two different columns.
这篇关于oracle PL/SQL:对行进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文