返回游标类型参数的过程调用
SQL> declare
2 v_kpi varray_list;
3 v_result SYS_REFCURSOR; 4 begin
5 -- Call the procedure
6 p_web_sql_kpi(v_usr => 'LC',
7 v_ciset => '201104自行车赛',
8 v_date_begin => '2011-06-01',
9 v_date_end => '2011-06-01',
10 v_time_begin => '11',
11 v_time_end => '12',
12 v_kpi => varray_list('TRAFFIC_TCH','TRAFFIC_PD'),
13 v_startidx => 1,
14 v_endidx => 10,
15 v_result => :v_result);
16 end;
17 /
PL/SQL 过程已成功完成。
SQL> print v_result
RECTIME TRAFFIC_TCH TRAFFIC_PD RN
-------------- ----------- ---------- ----------
01-6月 -11 2113.579 1771.341 1
01-6月 -11 1906.53 1716.18 2
CREATE OR REPLACE PROCEDURE P_WEB_SQL_KPI(V_USR IN VARCHAR,
V_CISET IN VARCHAR,
V_DATE_BEGIN IN VARCHAR,
V_DATE_END IN VARCHAR,
V_TIME_BEGIN IN INT,
V_TIME_END IN INT,
V_KPI &nbs