Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL dynamic variable

580969Jun 2 2007 — edited Jun 3 2007
hi

i have a problem what i am trying to do use to reference a variable in my PL/SQL procedure
and the name of the variable comes from a table:

EXECUTE IMMEDIATE 'SELECT ' || deskbank_ref_rows(row_index).JUSTI­ FICATION || '(' || deskbank_ref_rows(row_index).FIELD­ VALUE ||
',' || deskbank_ref_rows(row_index).FIELD­ SIZE || ',' || deskbank_ref_rows(row_index).PADDI­ NGCHAR || ')' || ' FROM DUAL'
INTO v_result_set;

deskbank_ref_rows(row_index).FIELD­ VALUE contains the variable name from a table
i want the string literal returned by deskbank_ref_rows(row_index).FIELD­ VALUE to reference the variable with the same name as the string literal in my procedure

is this possible?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 1 2007
Added on Jun 2 2007
6 comments
646 views