37 of 62
Nested Tables - Example 2b
uWrite a PL/SQL function to hide all required logic
u
ufunction f_getLov_nt
u (i_table_tx,i_id_tx,i_display_tx,i_order_tx)
ureturn lov_nt is
u  v_out_nt lov_nt := lov_nt();
ubegin
u  execute immediate
u    'select lov_oty('
u          ||i_id_tx||','||i_display_tx||
                  ')'||
u    ' from '||i_table_tx||
u    ' order by '||i_order_tx
u  bulk collect into v_out_nt;   
u  return v_out_nt;
uend;