How to execute procedures inside another? [duplicate]

0

I have this procedure where I save within a cursor all the other procedures that need to be executed, then I scroll the cursor putting the procedure names inside a variable.

How do you execute these procedures that have the name inside the + variable?

CURSOR cur_procedures IS
SELECT OBJECT_NAME FROM ALL_OBJECTS WHERE OBJECT_NAME like  
'%P_CES_INTERF_DIMOF_TREE_%' and OBJECT_TYPE IN ('PROCEDURE') 
and OBJECT_NAME not like '%P_CES_INTERF_DIMOF_TREE_SPS%'
order by OBJECT_NAME; 

Proc varchar(50);


BEGIN

OPEN cur_procedures;
LOOP 
FETCH cur_procedures INTO Proc;
EXIT WHEN cur_procedures%NOTFOUND;
END LOOP;
CLOSE cur_procedures;


END;
    
asked by anonymous 10.07.2015 / 18:43

1 answer

0

Use the EXECUTE IMMEDIATE

    
10.07.2015 / 19:47