Oracle PLS-00306:参数的数量或类型错误

Oracle PLS-00306:参数的数量或类型错误,oracle,plsql,oracle10g,plsqldeveloper,Oracle,Plsql,Oracle10g,Plsqldeveloper,我在以下过程中遇到错误“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_que

我在以下过程中遇到错误“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

我发现了错误。我必须使用x.tytid

您是如何运行此过程的?您希望在何处执行此过程?从sqlplus还是从前端应用程序?编译过程中是否没有任何错误?问题已经解决,sql developerGood中的编译错误已经解决。