ORA-22905: cannot access rows from a non-nested table item [message #327797] |
Tue, 17 June 2008 12:54  |
shrinika
Messages: 306 Registered: April 2008
|
Senior Member |
|
|
Can any one please tell me how i can fix this error?
SQL> explain plan set statement_id='XYZ' for
2 select * from emp where ename='SCOTT';
Explained.
SQL> select * from table(DBMS_XPLAN.DISPLAY('PLAN_TABLE','XYZ','BASIC'));
select * from table(DBMS_XPLAN.DISPLAY('PLAN_TABLE','XYZ','BASIC'))
*
ERROR at line 1:
ORA-22905: cannot access rows from a non-nested table item
|
|
|
|
Re: ORA-22905: cannot access rows from a non-nested table item [message #327799 is a reply to message #327797] |
Tue, 17 June 2008 13:03   |
 |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
In 9i, you have to cast to the function return type.
By the way, if you have a look at error messages, you find the same thing:
Quote: | ORA-22905: cannot access rows from a non-nested table item
Cause: attempt to access rows of an item whose type is not known at parse time or that is not of a nested table type
Action: use CAST to cast the item to a nested table type
|
Regards
Michel
[Updated on: Tue, 17 June 2008 13:03] Report message to a moderator
|
|
|
|