I need to create a collection of elements in a collection inside an inline view. I tried to disaggregate the collection and copy it again using the collection and table functions, but it does not work with ORA-03113.
The following is a simplified version of the request that is causing the problem.
In my implementation, I will have many levels of nested queries connected to joins in one query, which should combine all the collections into one. For performance reasons (expensive context switching), implementing PL / SQL code to aggregate collections is not an option.
Thanks so much for your feedback / suggestions.
Script
SELECT BANNER FROM V$VERSION / CREATE OR REPLACE TYPE OBJECT_ID_TAB_T IS TABLE OF NUMBER(11); / SELECT OWNER, CAST(COLLECT( MULTISET(SELECT COLUMN_VALUE FROM TABLE((OBJECT_ID_LIST) ))) AS OBJECT_ID_TAB_T) AS OBJECT_ID_LIST FROM (SELECT OWNER, OBJECT_NAME, CAST(COLLECT(OBJECT_ID) AS OBJECT_ID_TAB_T) AS OBJECT_ID_LIST FROM ALL_OBJECTS GROUP BY OWNER, OBJECT_NAME ) GROUP BY OWNER /
results
BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production PL/SQL Release 11.2.0.1.0 - Production CORE 11.2.0.1.0 Production TNS for 64-bit Windows: Version 11.2.0.1.0 - Production NLSRTL Version 11.2.0.1.0 - Production 5 rows selected. Type created. SELECT OWNER, CAST(COLLECT( MULTISET(SELECT COLUMN_VALUE FROM TABLE((OBJECT_ID_LIST) ))) AS OBJECT_ID_TAB_T) AS OBJECT_ID_LIST FROM (SELECT OWNER, OBJECT_NAME, CAST(COLLECT(OBJECT_ID) AS OBJECT_ID_TAB_T) AS OBJECT_ID_LIST FROM ALL_OBJECTS GROUP BY OWNER, OBJECT_NAME ) GROUP BY OWNER * Error at line 0 ORA-03113: end-of-file on communication channel Process ID: 8000 Session ID: 154 Serial number: 164 Script Terminated on line 25.
source share