Question

ORA-22905: cannot access rows from a non-nested table item

When calling a function defined in Oracle like:

Function cd_dupe_ck (vdate in Varchar2)  
Return cd_dupckrow_t Pipelined  

Types:

Type cd_dupckrow_t Is Table Of cd_dupckrow;  
Type cd_dupckrow Is Object ( [some columns] );  

When calling from the report development tool (VS2012) with a constant it works just fine. But when trying the non-trivial case (using a parameter) it gets the 22905 error. e.g.

Select  * From  Table ( cd_dupe_ck( &date_p ) ) <<< FAILS  

but

Select  * From  Table ( cd_dupe_ck( '20140101' ) ) <<< works fine  

The ideal solution would be to find a way to pass the parameter by value, but I would settle for it working. The @date_p parameter in the report is mapped to &date_p in the dataset.

Was it helpful?

Solution

As I said in my comment above it turns out the answer was simple, but unexpected.
After attempting to replicate the issue in both Crystal Reports and Jasper, having it work fine in both, I was puzzled as to why it only worked with a constant parameter to the table function.

When I came up with another report that utilized a table function that only had a couple of column I realized I had never tried a

Select col1,col2,col3, etc.  

format on my select, just a Select *
Upon enumerating all the columns from the table function, it worked without error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top