I have an SQL statement that returns multiple rows.. (two columns)..
and I can't seem to figure out how to use it within a PL/SQL procedure using two parameters from the procedure.
I've tried using records/tables (until I discovered PL/SQL tables can only be one column), and currently "EXECUTE IMMEDIATELY".. which works (i.e. compiles/executes) but the output from the SQL statement is not displayed.
/Code:CREATE OR REPLACE PROCEDURE testList (title VARCHAR2, type VARCHAR2) AS getList VARCHAR2(500); BEGIN getList := '<the SQL statement>'; EXECUTE IMMEDIATE getList USING title, type; END testList;