Executing Oracle Stored Proc from SQL+
Just for self!
To execute an Oracle stored procedure in a package that returns a refcursor follow the below command:
SQL> set num 2
SQL> set linesize 1500
SQL> var refc refcursor
SQL> exec pkg_report.sp_get_bdg_clnt_grd_smry_det(2899, :refc);
PL/SQL procedure successfully completed.
To print the executed results, use the below command:
SQL> print refc