首页 > 代码库 > oracle获取子串

oracle获取子串

--获取子串
create or replace function agfhd_f_substr(p_src in varchar2, p_csmc in varchar2) return varchar2
as
v_csmc varchar2(8000);
v_res varchar2(8000);
begin

v_csmc:=‘{‘||p_csmc||‘}‘;

select substr(p_src, INSTR(p_src,v_csmc)+length(v_csmc),INSTR(p_src,v_csmc,INSTR(p_src,v_csmc)+1)-INSTR(p_src,v_csmc)-length(v_csmc)) into v_res
from dual;


return v_res;
end agfhd_f_substr;

oracle获取子串