复制代码 代码如下:
Created on // by WANGNAN
declare
Local variables here
i integer;
TYPE t_table IS TABLE OF VARCHAR( ) INDEX BY VARCHAR ();
v_t_table t_table;
TYPE t_pg IS TABLE OF asisPG_AGENTCD_CONVERSION% ROWTYPE;
v_pg_table t_pg;
c_pg_vendor comcRef;
v_str VARCHAR( );
begin
Test statements here
OPEN c_pg_vendor FOR SELECT * FROM asisPG_AGENTCD_CONVERSION;
FETCH c_pg_vendor BULK COLLECT INTO v_pg_table;
FOR i IN unt LOOP
v_t_table(v_pg_table(i)ASIS_AGENT_CD) := v_pg_table(i)TOBE_VENDOR_CD;
END LOOP;
v_str := v_t_tablefirst;
WHILE v_str is NOT NULL LOOP
dbms_outputput_line(v_str || : ||v_t_table(v_str));
v_str := v_t_tablenext(v_str);
END LOOP;
EXCEPTION WHEN OTHERS THEN
dbms_outputput_line( sqlerrm);
END;