如何从ora中的值混合字符和数字中选择max函数?

问题描述

我想从值类似于oracle 19C中的“ OL10001”的列中选择最大值

我在sql server中使用此查询

 SELECT MAX(BID) AS AUTOID FROM billing
 
 //culumn BID contains value (BL10001,BL10002 ....)
 //the query will return the maximum value.

如何在oracle中使用这种概念选择?

我尝试过:

  SELECT MAX(BID) AS AUTOID FROM billing
  //this is error in oracle  ORA-00904: "BID": invalid identifier

第二次尝试

 select max(NVL(SUBSTR(BID,3,INSTR(BID,'R')+5),BID)) AS output  FROM billing
 //This query can solve the problem,but I need something is better.

还有其他更好的解决方案吗?

谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)