Skip to Main Content

APEX

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

parameterized pipelined function in where clause only allows single facet to have compute counts (ORA-22905)

Patrick27Aug 9 2023 — edited Aug 9 2023

Hello,

I've got a classic report (source: local view) with faceted search. In the WHERE clause i've got the following query:

id_application IN (
   with ids as (
      select /*+ MATERIALIZE */ *
      from   table(pkg_apx_cs_tab_func.f_apx_cs_v_applicationlist
                     (
                       p_from_page => :P50_FROM_PAGE_ALIAS,
                       p_from_workload => :P50_FROM_WORKLOAD,
                       p_from_status => :P50_FROM_STATUS,
                       p_from_migrationcluster => :P50_FROM_MIGRATIONCLUSTER
                     )
             )
   )
   select column_value from ids
)

This works great as long as I only enable “Compute Counts” on a single facet. When I enable more than one I get the following error:

Ajax call returned server error ORA-22905: cannot access rows from a non-nested table item

It obviously has something to do with the recounting of the facets.

The type that is returned from the pipelined function is created as a schema object:

create or replace TYPE t_apx_cs_appidlist IS TABLE OF NUMBER;

All objects reside in a single schema.

Any ideas?

I suppose a solution could be to make the source-type “SQL Query” and make that a parameterized pipelined function which returns all the columns instead of a list of PK's. But unfortunately that would cause quite a lot of rework and make it less flexible. And I don't know if that would even work (but I wouldnt hurt trying out..)

Thanks!

This post has been answered by Patrick27 on Aug 10 2023
Jump to Answer

Comments

Post Details

Added on Aug 9 2023
1 comment
59 views