日期:2014-05-17 浏览次数:21250 次
FUNCTION fn_split(pi_str In Varchar2, pi_separator In Varchar2) RETURN t_Array IS idx Number; currentindex Number := 1; strs t_Array; v_str varchar2(4000) := pi_str; BEGIN IF pi_str IS NOT NULL AND pi_separator IS NOT NULL THEN --存在分隔符 END IF; IF v_str IS NOT NULL THEN strs(currentindex) := v_str; END IF; Return strs; END fn_split;
select commonpackages.fn_split('sdsd,sdsd,sdsd,sdsaasdf',',') from dual; Select * from emp where ename=commonpackages.fn_split('sdsd,sdsd,sdsd,sdsaasdf',',');