我是oracle的新手,但是我在oracle的一个包中创建了一个程序,我得到了这个错误信息任何人都可以看到我做错了什么?

时间:2013-10-02 19:38:18

标签: oracle plsql

“错误(33,13):PLS-00323:子程序或游标'USP_CHECK_USER_ADMIN'在包规范中声明,必须在包体中定义”

create or replace 
PACKAGE         PKG_CUST_XREF1 AS

PROCEDURE USP_ADD_CUSTOMER
(
   p_CUST_ID IN MDW.CUSTOMER_STRUCTURE_XREF.CUST_ID%TYPE
   , p_ADDR_SUF IN MDW.CUSTOMER_STRUCTURE_XREF.ADDR_SUF%TYPE
   , p_PLAN_SYS_ID_SOURCE_CD IN MDW.CUSTOMER_STRUCTURE_XREF.PLAN_SYS_ID_SOURCE_CD%TYPE
   , p_REGION_ID IN MDW.CUSTOMER_STRUCTURE_XREF.REGION_ID%TYPE
   , p_COMPANY_ID IN MDW.CUSTOMER_STRUCTURE_XREF.COMPANY_ID%TYPE
   , p_REP_ID IN MDW.CUSTOMER_STRUCTURE_XREF.REP_ID%TYPE
   , p_TYPE_ID IN MDW.CUSTOMER_STRUCTURE_XREF.TYPE_ID%TYPE
   , p_EXTERNAL_ACCT_NO IN MDW.CUSTOMER_STRUCTURE_XREF.EXTERNAL_ACCT_NO%TYPE
   , p_REGION_NAME IN MDW.CUSTOMER_STRUCTURE_XREF.REGION_NAME%TYPE
   , p_COMPANY_NAME IN MDW.CUSTOMER_STRUCTURE_XREF.COMPANY_NAME%TYPE
   , p_SUF_NAME IN MDW.CUSTOMER_STRUCTURE_XREF.SUF_NAME%TYPE
   , p_CUST_NAME IN MDW.CUSTOMER_STRUCTURE_XREF.CUST_NAME%TYPE
   , p_INDUSTRY_TYPE_DESC IN MDW.CUSTOMER_STRUCTURE_XREF.INDUSTRY_TYPE_DESC%TYPE
   , p_CHANNEL_TYPE_DESC IN MDW.CUSTOMER_STRUCTURE_XREF.CHANNEL_TYPE_DESC%TYPE
   , p_INDUSTRY_SPECIALIST_ID IN MDW.CUSTOMER_STRUCTURE_XREF.INDUSTRY_SPECIALIST_ID%TYPE
   , p_CUSTOMER_CLASS IN MDW.CUSTOMER_STRUCTURE_XREF.CUSTOMER_CLASS%TYPE
   , p_ORA_CUST_ID IN MDW.CUSTOMER_STRUCTURE_XREF.ORA_CUST_ID%TYPE
   , p_STATUS IN MDW.CUSTOMER_STRUCTURE_XREF.STATUS%TYPE
);
END PKG_CUST_XREF1;

/* BODY!!*/

create or replace 
PACKAGE BODY         PKG_CUST_XREF1
IS
PROCEDURE USP_ADD_CUSTOMER(
   p_CUST_ID IN MDW.CUSTOMER_STRUCTURE_XREF.CUST_ID%TYPE
   , p_ADDR_SUF IN MDW.CUSTOMER_STRUCTURE_XREF.ADDR_SUF%TYPE
   , p_PLAN_SYS_ID_SOURCE_CD IN MDW.CUSTOMER_STRUCTURE_XREF.PLAN_SYS_ID_SOURCE_CD%TYPE
   , p_REGION_ID IN MDW.CUSTOMER_STRUCTURE_XREF.REGION_ID%TYPE
   , p_COMPANY_ID IN MDW.CUSTOMER_STRUCTURE_XREF.COMPANY_ID%TYPE
   , p_REP_ID IN MDW.CUSTOMER_STRUCTURE_XREF.REP_ID%TYPE
   , p_TYPE_ID IN MDW.CUSTOMER_STRUCTURE_XREF.TYPE_ID%TYPE
   , p_EXTERNAL_ACCT_NO IN MDW.CUSTOMER_STRUCTURE_XREF.EXTERNAL_ACCT_NO%TYPE
   , p_REGION_NAME IN MDW.CUSTOMER_STRUCTURE_XREF.REGION_NAME%TYPE
   , p_COMPANY_NAME IN MDW.CUSTOMER_STRUCTURE_XREF.COMPANY_NAME%TYPE
   , p_SUF_NAME IN MDW.CUSTOMER_STRUCTURE_XREF.SUF_NAME%TYPE
   , p_CUST_NAME IN MDW.CUSTOMER_STRUCTURE_XREF.CUST_NAME%TYPE
   , p_INDUSTRY_TYPE_DESC IN MDW.CUSTOMER_STRUCTURE_XREF.INDUSTRY_TYPE_DESC%TYPE
   , p_CHANNEL_TYPE_DESC IN MDW.CUSTOMER_STRUCTURE_XREF.CHANNEL_TYPE_DESC%TYPE
   , p_INDUSTRY_SPECIALIST_ID IN MDW.CUSTOMER_STRUCTURE_XREF.INDUSTRY_SPECIALIST_ID%TYPE
   , p_CUSTOMER_CLASS IN MDW.CUSTOMER_STRUCTURE_XREF.CUSTOMER_CLASS%TYPE
   , p_ORA_CUST_ID IN MDW.CUSTOMER_STRUCTURE_XREF.ORA_CUST_ID%TYPE
   , p_STATUS IN MDW.CUSTOMER_STRUCTURE_XREF.STATUS%TYPE)
 IS

 BEGIN
   INSERT INTO MDW.CUSTOMER_STRUCTURE_XREF
   (
   CUST_ID
   , ADDR_SUF
   , PLAN_SYS_ID_SOURCE_CD
   , REGION_ID
   , COMPANY_ID
   , REP_ID
   , TYPE_ID
   , EXTERNAL_ACCT_NO
   , REGION_NAME
   , COMPANY_NAME
   , SUF_NAME
   , CUST_NAME
   , INDUSTRY_TYPE_DESC
   , CHANNEL_TYPE_DESC
   , INDUSTRY_SPECIALIST_ID
   , CUSTOMER_CLASS
   , ORA_CUST_ID
   , STATUS
    ) 
   VALUES (
   p_CUST_ID
   , p_ADDR_SUF
   , p_PLAN_SYS_ID_SOURCE_CD
   , p_REGION_ID
   , p_COMPANY_ID
   , p_REP_ID
   , p_TYPE_ID
   , p_EXTERNAL_ACCT_NO
   , p_REGION_NAME
   , p_COMPANY_NAME
   , p_SUF_NAME
   , p_CUST_NAME
   , p_INDUSTRY_TYPE_DESC
   , p_CHANNEL_TYPE_DESC
   , p_INDUSTRY_SPECIALIST_ID
   , p_CUSTOMER_CLASS
   , p_ORA_CUST_ID
   , p_STATUS);

  COMMIT;

END USP_ADD_CUSTOMER;

END PKG_CUST_XREF1;

1 个答案:

答案 0 :(得分:0)

是的,我们可以看到你做错了什么 - PL / SQL编译器告诉你确切的原因:

PLS-00323: subprogram or cursor 'USP_CHECK_USER_ADMIN' is declared in a package
specification and must be defined in the package body

如果您无法理解错误消息,请参阅PL/SQL Packages中的 Package Body 一章。

您可能也应该阅读整个Oracle Database PL/SQL Language Reference