0

「エラー (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;
4

1 に答える 1

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パッケージのパッケージ本体の章を参照してください。

おそらく、Oracle Database PL/SQL 言語リファレンス全体も読む必要があります。

于 2013-10-03T04:49:08.063 に答える