I have a procedure which takes a list of values from expns_tab pl/sql table and e_act_cd from the list as defined below. I need to check if the e_act_cd is in the list then perform few operations based on that.
But I'm a little confused on how I can select from the v_ac_tab. Any ideas?
The place where I'm confused is in bold below.
PROCEDURE p_exp_amt_by_acct_cd (
expns_tab IN expns_list
-- acct_cd_tab in acct_cd_list
TYPE ac_list IS TABLE OF varchar2 (10);
v_ac_tab ac_list := ac_list ('11', '22','33', '44');
FOR rec IN (SELECT e_act_cd, NVL (SUM (amt), 0)
FROM TABLE (CAST (expns_tab AS expns_list))
WHERE cct = 'aaa'
AND e_act_cd IN (select * from TABLE( CAST (v_ac_tab AS ac_list)))
GROUP BY e_act_cd)