Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> select with column name stored in variable
hi newsgroup,
inside a pl/sql-procedure I have the name of a column stored inside a variable. It is there because I select it from another table.
How do I access the values inside this column?
Example:
...
SELECT map_col INTO mc FROM meta_tab WHERE ...
SELECT mc INTO col_val FROM real_tab WHERE ...
...
The second statement does not work. col_val is always equal to mc. But how do i get the value of the column which is specified by mc?
I'm using Oracle 9.2.0.1.0 on SuSE-Linux 8.0.
-- mac real email-adress: mac clondiag comReceived on Thu Jan 02 2003 - 05:17:15 CST
![]() |
![]() |