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

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -