每次执行时都会出现编译错误

时间:2014-03-27 05:12:40

标签: oracle stored-procedures oracle10g

CREATE or REPLACE PROCEDURE SP_INSERT_OVERSEAS_COMPANY
( 
  COMPANY_CODE    IN   NUMBER,
  COMPANY_NAME    IN    VARCHAR2,
  STREET_ADDR     IN   VARCHAR2,
  COMPANY_STATE   IN   VARCHAR2,
  ZIP_CODE        IN   VARCHAR2,
  COUNTRY         IN   VARCHAR2,
  CONTACT_PERSON  IN   VARCHAR2,
  CONTACT_NUMBER  IN   VARCHAR2
)
AS
BEGIN

     IF sysdate between trunc(sysdate,'DD')+interval '9' hour and trunc(sysdate,'DD')+interval '17' hour
     THEN 
         INSERT INTO Overseas_Company
         VALUES
              (COMPANY_NAME,COMPANY_NAME,STREET_ADDR,COMPANY_STATE,ZIP_CODE,COUNTRY,CONTACT_PERSON,CONTACT_NUMBER);
          ELSE  
               dbms_output.put_line ('Process is outside of normally working hours');    
        END IF;

END SP_INSERT_OVERSEAS_COMPANY;
/

1 个答案:

答案 0 :(得分:0)

COMPANY_NAME,COMPANY_NAME,...COMPANY_CODE,COMPANY_NAME,...吗?过程中未使用参数COMPANY_CODE。您收到数字转换错误了吗?