Skip to Main Content

dynamic column name in select

SJenkinsMar 1 2021

I need a dynamic action (preferably PL/SQL Function Body) to:
declare ret_val varchar(50);
begin
select :column_name into ret_val from table where primary_col = :primary_value;
return ret_val;
end;

basically I have a select list in an interactive grid where they can pick the column_name
then the dynamic action looks up the value in that column and sets it in another column.
problem is, the dynamic action sets it to the column_name instead of the value...
its acting like: select "column_name" into ret_val from table; instead of looking up the value of the column

This post has been answered by Frank Kulash on Mar 1 2021
Jump to Answer
Comments
Post Details
Added on Mar 1 2021
2 comments
3,527 views