Hi,
I'm using oracle 7.3.4.5 (plsql 2.3.4.5.0) and am trying to do something akin to dynamic sql but with plsql. What I'm trying to achieve is to create a function that returns the values stored in a package variable by passing in the name of the table and column and returning the contents of the table and column.
For example:
policy_row stores all the variables in our policy table available to our package in question, but not to the outside.
my function (return_init_var) - has two incoming parameters - table_name and field_name, so a call may look like:
trfutil.return_init_var(table_name => 'policy',
field_name => 'trans_id');
My function would want to return the contents of policy_row.trans_id. Does anyone know how to do this? I can't use dbms_sql as the necessary statement is plsql not sql. I was wondering if I could use any other dbms utility to do the job.
Help and thanks!
I'm using oracle 7.3.4.5 (plsql 2.3.4.5.0) and am trying to do something akin to dynamic sql but with plsql. What I'm trying to achieve is to create a function that returns the values stored in a package variable by passing in the name of the table and column and returning the contents of the table and column.
For example:
policy_row stores all the variables in our policy table available to our package in question, but not to the outside.
my function (return_init_var) - has two incoming parameters - table_name and field_name, so a call may look like:
trfutil.return_init_var(table_name => 'policy',
field_name => 'trans_id');
My function would want to return the contents of policy_row.trans_id. Does anyone know how to do this? I can't use dbms_sql as the necessary statement is plsql not sql. I was wondering if I could use any other dbms utility to do the job.
Help and thanks!