Re: how to cast ORA-22905 away?

From: Thomas Kellerer <YQDHXVLMUBXG_at_spammotel.com>
Date: Mon, 08 Dec 2008 14:52:46 +0100
Message-ID: <6q4n5fFar5djU1@mid.individual.net>


Helma, 08.12.2008 14:41:
> SQL> SELECT * FROM TABLE(dbms_xplan.display
> ('PLAN_TABLE','p10','BASIC'));
>
> SELECT * FROM TABLE(dbms_xplan.display('PLAN_TABLE','p10','BASIC'))
> *
> ERROR at line 1:
> ORA-22905: cannot access rows from a non-nested table item
>
> According to Dr Google i have to cast this value. Whatever example i
> try , i cannot get it to work ( i haven't seen an example with the
> xplan.display). Can anyone give me the right syntax?
>

You need to replace the * with an explicit reference to the column:

SELECT plan_table_output
FROM TABLE(dbms_xplan.display('PLAN_TABLE','p10', 'BASIC'))

Thomas Received on Mon Dec 08 2008 - 07:52:46 CST

Original text of this message