I need to use this query in update statement
UPDATE RUN_RESULT
SET UNQKEY = (
select UNQKEY_VALUE
from (
select distinct RUN_ID,
TOCID,
'UNQKEY' || r as UNQKEY ,
TOCNAME,
UNIQUENESS_COLUMN_ID,
DECODE( r, 1, UNQKEY1, 2, UNQKEY2, 3, UNQKEY3, 4, UNQKEY4 , 5, UNQKEY5) AS UNQKEY_VALUE
from TOC TOC,
RULE RL,
RUN_RESULT RR,
(select rownum r
from all_objects
where rownum <=5)
WHERE RL.RULE_SET_ID=RR.RULE_SET_ID
AND TOC.TOCID= RR.TOC_ID ) t
WHERE UNIQUENESS_COLUMN_ID like UNQKEY
and UNQKEY_VALUE IS NOT NULL )
Where ?????
I have to use the inner query column like RUN_ID,TOCID, how to access in the inner query columns