Problem : PL/SQL Equivalent to Forms’ NAME_IN

Problem :PL/SQL Equivalent to Forms’ NAME_IN


I am in a situation where I would like an equivalent to Forms’ NAME_IN function that I can use in a PL/SQL.

What I am trying to do is to store the name of a variable (var1) in another variable (var2), and want to access var1’s value and take some actions based on the value.

I hope someone has some good answer,
Thanks in advance

Solution : PL/SQL Equivalent to Forms’ NAME_IN

There is not a name_in function in PL/SQL.  You can use a technique called in indirect referencing with dynamic SQL to simulate the name_in function.

Here is an example:

declare  x varchar2(10);
y varchar2(10) := ‘charfield’;
execute immediate ‘ begin 😡 := :y; end; ‘ using out x , y;
dbms_output.put_line ( x );