Is it possible to call procedure from select statement and include the out variable values in the cursor?
Note: I am not giving actual procedures because they are so big
Procedure 1:
CREATE OR REPLACE PROCEDURE CALL_MAIN_PROC(input_id IN NUMBER,
outt_cursor OUT sample_cursor)
IS
BEGIN
OPEN outt_cursor FOR
SELECT A.FIRST,
A.SECOND,
B.ONE,
B.TWO,
CALL_PROC(OUT ONEVAR, OUT TWOVAR) -- call another procedure
FROM TABLEA A, TABLE B
WHERE A.ID = B.ID;
END;
Procedure 2:
CREATE OR REPLACE PROCEDURE CALL_PROC(p_cv OUT DATE, p_num OUT NUMBER) AS
BEGIN
SELECT SYSDATE intp p_cv FROM DUAL ;
p_num := 1;
END;