Question: Output multiple REFCURSOR variables
Posted: Wed 19 Dec 2012 17:36
Is there a way to output multiple REFCURSOR variables to the data window in separate tabs?
Current Behavior (Single Variable): Executing the following statement will output the cursor to the data window.
Current Behavior (Multiple Variables) : Executing the following statement will only output the first cursor variable to the data window.
Expected/Desired Result:
Both REFCURSOR variables output to the data windows in separate tabs similar to executing the following sample statements in a single query window. Each query is displayed in the data window under a separate tab Query1 and Query2 respectively.
Current Behavior (Single Variable): Executing the following statement will output the cursor to the data window.
Code: Select all
VARIABLE
RC REFCURSOR;
DECLARE
MY_NUMBER NUMBER := 100;
BEGIN
OPEN :RC FOR
SELECT MY_NUMBER DIGIT FROM DUAL D;
END;
Code: Select all
VARIABLE
RC REFCURSOR;
VARIABLE
RC2 REFCURSOR;
DECLARE
MY_NUMBER NUMBER := 100;
MY_OTHER_NUMBER NUMBER := 200;
BEGIN
OPEN :RC FOR
SELECT MY_NUMBER DIGIT FROM DUAL D;
OPEN :RC2 FOR
SELECT MY_OTHER_NUMBER OTHER_DIGIT FROM DUAL D;
END;
Expected/Desired Result:
Both REFCURSOR variables output to the data windows in separate tabs similar to executing the following sample statements in a single query window. Each query is displayed in the data window under a separate tab Query1 and Query2 respectively.
Code: Select all
SELECT 100 DIGIT FROM DUAL D;
SELECT 200 OTHER_DIGIT FROM DUAL D;