Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> select with column name stored in variable

select with column name stored in variable

From: Michael Howitz <mhowitz_at_firemail.de>
Date: Thu, 02 Jan 2003 12:17:15 +0100
Message-ID: <3E141FBB.1010602@firemail.de>


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 com
Received on Thu Jan 02 2003 - 05:17:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US