日期:2014-05-17 浏览次数:20856 次
select flag
,((case when length(to_char(flag))=1 then 'CMK00'
when length(to_char(flag))=2 then 'CMK0'
else 'CMK' end)||flag) as res
from (
select (TO_NUMBER(substr('CMK001',4))+1) as flag
from dual
)
------解决方案--------------------
个人觉得
name(流水号名字) currvalue(当前值)
XF20101022 3
FK201010 4