I have been able to create a data-driven subscription for a report (email delivery) where the data comes from an Oracle database (11g) but only if I write the SELECT statement directly within the subscription definition page.
I would rather embed the logic for the SELECT statement within a stored procedure within a package but when I try this and validate the call it always says that ‘…the query is not valid for the data source’.
I have tried the syntax PACKAGE_NAM.PROC_NAME as well as prefixing this with ‘exec’ but no luck.
The stored procedure is define as:
PROCEDURE PROC_NAME(pResult OUT refcur) … where ‘refcur’ is defined as ‘REF CURSOR’ which I think is pretty standard and compiles with no errors
Has anybody managed to do what I am trying? Is it even possible?
Could you do it with a function that returns a table? Basically you would do
and make the function return the correct datatype (more info here, for example, http://www.akadia.com/services/ora_pipe_functions.html)