pls-00103:遇到符号“;”预期以下情况之一:循环

时间:2019-08-23 07:53:28

标签: plsql oracle12c

我写了一个SP插入父表和子表。我收到错误

  

pls-00103:遇到符号“;”当期望以下之一时:循环。

当我通过oracle工作表运行时,它正在插入。通过我的代码运行时会抛出错误。

下面我已经提到了SP及其执行方式

CREATE OR REPLACE PROCEDURE SP_INSERT_RPAEXCEPTION
(
  CONTRACT_CODE IN VARCHAR2  
, EFFECTIVE_DATE IN DATE   
, QUOTE_LINE_ID IN VARCHAR2  
, TXN_ID IN VARCHAR2  
, ERROR_CODE IN VARCHAR2  
, ERROR_DESCRIPTION IN VARCHAR2 
, ERROR_LOCATION IN VARCHAR2 
, ERROR_MODULE IN VARCHAR2 

)
AS 
BEGIN

  INSERT INTO errorinfo
  (
   CONTRACT_CODE,
    EFFECTIVE_DATE,
    PLAN_PROXY_ID,
    QUOTE_LINE_ID,
    TXN_ID,
    ERROR_CODE,
    ERROR_DESCRIPTION,
    ERROR_TIMESTAMP
  )
  VALUES
  (
  CONTRACT_CODE, 
  EFFECTIVE_DATE,
  '',
  QUOTE_LINE_ID,
  TXN_ID,
  ERROR_CODE,
  ERROR_DESCRIPTION,
  sysdate
  );


 INSERT
INTO ERRORDETAILS
  (   
    ERROR_INFO_ID,
    ERROR_LOCATION,
    ERROR_MODULE,
    ERROR_DETAIL
  )
  VALUES
  (
    "USER"."ISEQ$$_941".CURRVAL,
    ERROR_LOCATION,
    ERROR_MODULE,
    ERROR_DESCRIPTION
  );
END;
    
EXEC SP_EXCEPTION ('4563','01-Jan-2020','ss123','ss123','603','Base not avail,'Find','Base version');

1 个答案:

答案 0 :(得分:0)

在下面的执行尝试中缺少单引号:

EXEC SP_EXCEPTION('4563','01-Jan-2020','ss123','ss123','603', '基础不可用' , “查找”,“基本版本”);