HI
I'm using 11g and have a below below procedure where I want to refer to column name using variable but unable to do so.
Please assist
table abc_properties hold few column name as values.
p_flag would have column names like 'NAME,DESCRIPTION,TYPE,PRICE'
so each comma seperated value I was get the respective column value from p_config_old_row ,p_config_new_row.
tried the below code and unable to refer to column name using variable
procedure abc (
p_config_old_row IN A_CONFIGURATIONS%rowtype,
p_config_new_row IN A_CONFIGURATIONS%rowtype,
p_flag IN varchar2,
p_sso_user_id IN number,
p_bpt_user_id IN number
)
is
begin
for rec in (select name
from abc_properties
where
active = 'Y') loop
if INSTR(rec.name,p_flag)>0 then
l_col_name:=rec.name;
config_details:=config_details || p_config_new_row.l_col_name --- this should assign p_config_new_row.name if l_col_name =name
end if;
end loop;
end;
please assist
thanks
Archana