This approach might help:
Call a PL/SQL procedure that does the super-complex query, and creates a temporary table.
Then select * from the temporary table.
Here's some code that does something like that:
event_sql = evalinsert(
"DECLARE
l_proc_name VARCHAR2 (100) := 'Get_Reference_PTs';
l_user_SID NUMBER := SYS_CONTEXT('USERENV', 'SID');
l_user_name VARCHAR2 (30) := UPPER(SYS_CONTEXT('USERENV', 'OS_USER'));
BEGIN
INSERT INTO quality_attrib (SID, OS_USER, Completion_Time, Progress_Text)
VALUES (l_user_SID, l_user_name, SYSTIMESTAMP, 'START Get_Reference_PTs');
COMMIT;
INSERT INTO Ref_PT_List (SID, OS_USER, PT_Name)
(SELECT DISTINCT l_user_SID, l_user_name, mu.pt_name
FROM info ci,
drug cd,
reaction cr,
meddra_uta mu,
WHERE cd.case_id = ci.case_id
AND cr.case_id = ci.case_id
AND cr.reported_meddra_uta_id = mu.meddra_uta_id
AND cd.cdd_generic_id = rd.cdd_generic_id
AND ci.report_type_code_id = 8
AND rd.calendar_id = ^one_calendar_id^
AND cd.drug_character_code_id IN (31, 32)
^pt_clause^
^date_clause^
^event_type_clause^
);
COMMIT;
INSERT INTO quality_attrib (SID, OS_USER, Completion_Time, Progress_Text)
VALUES (l_user_SID, l_user_name, SYSTIMESTAMP, 'END Get_Reference_PTs');
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
log_error_message(SQLCODE, SQLERRM, l_proc_name);
END; ");
Execute SQL(dbc, event_sql);
Execute SQL(dbc, "select * from ref_pt_list");