I have a procedure like this:
procedure foo(
p_field_name in varchar2,
p_record in table%rowtype )
is
v_value varchar2( 100 );
begin
execute immediate 'select p_record.' || p_field_name || ' from dual' into v_value;
end
Oracle complains that "p_record"."my_field_name" is an invalid identifier, which leads me to believe that the execute immediate is running in some other context.
Is it possible to do what I'm trying to do above?