sql - Dynamic Column Name In Cursor PLSQL -
i've been working on query in pl/sql. i've same named columns column1, column2, column3.
in cursor, how can value of these columns using dynamically name. example:
for cursor_r in cursor_c loop begin if cursor_r.column1 = 'dummy1' myproc(cursor_r.column1); elsif cursor_r.column1 = 'dummy2' myproc(cursor_r.column2); elsif cursor_r.column1 = 'dummy3' myproc(cursor_r.column3); end if; end; end loop;
thanks.
you can use dynamical sql column names. see this
Comments
Post a Comment