I have a procedure in the package which returns a SYS_REFCURSOR, i want to return null or empty based on a condition, not sure how can i do it.
PROCEDURE test( id_number IN VARCHAR2,
resultIN OUT SYS_REFCURSOR) AS
BEGIN
if true then
OPEN resultIN FOR
SELECT
fieldsValue
from TableName;
ELSE
Return empty resultIN ;
END IF;
END;
This is not working for me. How can I do the same.