Oracle 9i中的正则表达式

时间:2012-11-01 02:14:49

标签: oracle

嗨,任何人都可以帮帮我,我的情景是

select to_number(((replace('1*Students', 'Students','60')))) 
  from dual;  

如果我这样使用,则会出现无效号码错误 如何转换为数字,它应显示结果为“60”,请帮帮我,我堆叠。非常感谢提前

1 个答案:

答案 0 :(得分:0)

select
 to_number( substr ( replace('1*Students', 'Students','60'), 0,instr( replace('1*Students', 'Students','60'), '*' )-1 ),'9999.99')    

 *
 to_number(substr ( replace('1*Students', 'Students','60'), instr(  replace('1*Students', 'Students','60'), '*' )+1 ),'9999.99')

from dual

fiddle demo