我在以下过程中收到此错误“PLS-00306:参数数量或类型错误”:-
CREATE OR REPLACE procedure TEST1(p_cursor in out sys_refcursor)
as
sql_query varchar2(1000) := 'select UTL_ID,';
begin
for x in (select distinct tyt_id from GTEMP_TPOAR order by 1)
loop
sql_query := sql_query ||
'sum(case when tyt_id = '||x|| ' then cnt end)'|| x ||',';
dbms_output.put_line(sql_query);
end loop;
sql_query := RTRIM(sql_query, ',');
sql_query := sql_query || ' from GTEMP_TPOAR';
open p_cursor for sql_query;
end;
我正在使用 oracle 10g