Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Index-by table in Select clause

793171Aug 23 2010 — edited Aug 23 2010
Hello,
i´m trying to use index-by table in Select clause in a Select statement. Here is example.
TYPE t_col IS TABLE OF NUMBER INDEX BY PLS_INTEGER;
v_col t_col;

--fill some data in the v_col table

SELECT t.column, v_col(t.column)
FROM table t
WHERE ......;
and i got the PLS-00201: identifier 't.column' must be declared. Why oracle doesn´t alow this construction? Is there any way to do something like this? I am only able to use
the index-by table in select cllause, if there is a variable as index of the index-by table instead of the table column.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2010
Added on Aug 23 2010
2 comments
872 views