0

下面是我创建的过程。当我执行它时,我得到“带有编译错误的过程”我不明白我在下面的过程代码中哪里出错了,有人通过在代码中找到错误来帮助我

create or replace PROCEDURE newprocedur(inMerid IN VARCHAR2,outCount OUT NUMBER) AS  
  CURSOR c1 IS 
    select CLIENT_COUNT 
     from OP_TMER_CONF_PARENT 
    where MER_ID = inMerid 
    FOR UPDATE OF CLIENT_COUNT;
BEGIN
  Open c1
  loop
    fetch c1 into outCount;
    exit when c1%NOTFOUND;
    outCount:=outCount+1;
    update OP_TMER_CONF_PARENT 
       set CLIENT_COUNT = outCount 
     where current of c1;
  end loop;
  close c1;
END;

提前致谢

4

2 回答 2

3

1- check for errors and see where error is
See here

2- You missed a semicolon in 5th line- should be

Open c1;
于 2012-10-30T11:20:36.360 回答
1

在 SQL*Plus 中,您可以使用命令

show errors

向您展示刚刚编译的 PL/SQL 代码中的错误。请参阅http://docs.oracle.com/cd/B19306_01/server.102/b14357/ch12041.htm

我不熟悉 PL/SQL Developer,但 TOAD 会自动执行此操作并向您显示错误,让您可以快速跳转到包含错误的行。

于 2012-10-30T11:19:22.597 回答