嗨,任何人都可以帮帮我,我的情景是
select to_number(((replace('1*Students', 'Students','60'))))
from dual;
如果我这样使用,则会出现无效号码错误 如何转换为数字,它应显示结果为“60”,请帮帮我,我堆叠。非常感谢提前
答案 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