【问题标题】:PLS-00306: wrong number or types of argumentsPLS-00306:参数的数量或类型错误
【发布时间】:2012-11-16 08:06:54
【问题描述】:

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

【问题讨论】:

  • 你是如何运行这个程序的?
  • 您希望您的程序在哪里执行?来自 sqlplus 还是来自前端应用程序?你编译程序没有任何错误吗?
  • 问题已修复,是sql developer编译错误
  • 很高兴知道它已经解决了。

标签: oracle plsql oracle10g plsqldeveloper


【解决方案1】:

我得到了错误。我必须使用 x.tytid

【讨论】:

    猜你喜欢
    • 2015-09-09
    • 2014-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-22
    相关资源
    最近更新 更多