字符串分隔 (抄自 atgc的博客)
SQL> select * from table(str2table('TEST1;12;123;55;99MOON;'));ACC--------------------------------------------------TEST121235599MOON[@more@]create or replace type acc_type as object(acc varchar2(50))/create or replace type acc_table as table of acc_type/create or replace function str2table (acc_str in varchar2) return acc_table pipelinedisv_str varchar2(30000) := acc_str;v_acc varchar2(30);v_acc_end pls_integer;beginloopv_acc_end := instrb(v_str,';');exit when (v_acc_end=0 or v_str is null);