CREATE OR REPLACE TYPE TYPE_SPLIT as table of varchar2(200);
create or reporacle账号lace function f_split(p_list varchar2,p_sep varchar2 := ‘,’)return TYPE_SPLITpipelinedisl_idx pls_integer;v_list varchar2(200) := p_list;beginloopl_idx := instr(v_list, p_sep);if l_idx > 0 thenpipe row(substr(v_list, 1, l_idx – 1));v_list := substr(v_list, l_idx + length(p_sep));elsepipe row(v_list);exit;end if;end loop;return;end f_split;
select column_value km from table(cpm_f_split(v_kms, ‘,’);