在sql developer中执行存储过程时出错

时间:2014-04-09 01:46:34

标签: oracle oracle-sqldeveloper

CREATE OR REPLACE PROCEDURE SP_DELETE_CUSTOMER
(

   TRN   IN    NUMBER

)
AS

BEGIN

     if to_char(sysdate, 'hh24:mi')  BETWEEN '09:00' and '10:00' AND to_char(sysdate, 'dy'
) in ('mon', 'fri') then 

          DELETE FROM CUSTOMER WHERE TRN_NUMBER =TRN;         
     ELSE  
           dbms_output.put_line ('Process is outside of normally working hours');    
    END IF; 
END;
/
BEGIN

Execute SP_DELETE_CUSTOMER(1223345);

END;
/

1 个答案:

答案 0 :(得分:1)

EXECUTE表示匿名阻止。你需要:

BEGIN
    SP_DELETE_CUSTOMER(1223345);
END;
/

或者只是:

Execute SP_DELETE_CUSTOMER(1223345);