uDeclare
u type integer_tt is
table of integer;
u v_cur_tt integer_tt;
uBegin
ufor r in v_groupRow_tt.first..v_groupRow_tt.last loop
u v_cur_tt(r):=DBMS_SQL.OPEN_CURSOR;
u for c in
c_cols(v_mapRows_tt(r)) loop
u for i in
v_header_tt.first..v_header_tt.last loop
u if
v_header_tt(i).text=c.name_tx then
u
v_col_tt(i):=c;
u
v_col_tx:=v_col_tx||','||v_col_tt(i).viewcol_tx;
u
v_val_tx:=v_val_tx||',:'||v_col_tt(i).viewcol_tx;
u end if;
u end loop;
u end loop;
u v_sql_tx:='insert
into '||v_map_rec.view_tx||
u '('||v_col_tx||')
values('||v_value_tx||')';
u
DBMS_SQL.PARSE(v_cur_tt(r),v_sql_tx,DBMS_SQL.NATIVE);
uend loop;