I have 2 packages and a procedures that return a sysref cursor. Now i want to call either of the 2 packages and procedures in another package and procedure that will take the decision on an input column as to which one needs to be called.
however accordingly the output of the inner proc has to go as the output of the outer proc. Can you please throw some light as how to do this..
CREATE OR REPLACE PACKAGE DEDUPE_PACKAGE_abc IS
TYPE refCursor IS REF CURSOR;
PROCEDURE ADD_CAF_abc(
IN_CUSTOMER_TYPE IN VARCHAR2 ,
retCursor_abc IN OUT refCursor );
CREATE OR REPLACE PACKAGE DEDUPE_PACKAGE_pqr IS
TYPE refCursor IS REF CURSOR;
PROCEDURE ADD_CAF_prq(
IN_CUSTOMER_TYPE IN VARCHAR2 ,
retCursor_pqr IN OUT refCursor );
CREATE OR REPLACE PACKAGE DEDUPE_PACKAGE_main IS
TYPE refCursor IS REF CURSOR;
PROCEDURE ADD_CAF_main(
IN_CUSTOMER_TYPE IN VARCHAR2 ,
retCursor_main IN OUT refCursor );
BEGIN
if IN_CUSTOMER_TYPE == something then
exec dedupe_package_abc.ADD_CAF_abc ;
-- i need the output of the cursor here
return ;
else IN_CUSTOMER_TYPE == something2 then
exec dedupe_package_pqr.ADD_CAF_pqr ;
-- i need the output of the cursor here
return ;
return -- i need to return the data from the retcursor_abc or the retcursor_pqr into the retrursor_main ...