1 Reply Latest reply: Aug 4, 2013 11:34 AM by Paul M. RSS

    HI I m getting error while executing the procedure

    15d37548-1242-4369-89be-162a6e2510fc

      set serveroutput on;

       

       

      DECLARE

       

       

      P_ACCOUNT_NO            PT_AGMT_PRICING_ENTITY.CHARGE_ACCOUNT_ID%TYPE ;

      P_amount                VARCHAR2(50);

         p_CreatedBy            VARCHAR2(50);

         p_Mode                 VARCHAR2(50);

        p_ret_var        VARCHAR2(50);

         P_ERR_CODE        NUMBER;

         P_ERR_MESG           VARCHAR2(100);

         P_ROWS_AFFECTED     INTEGER;

        

      V_PRICE VARCHAR2(10);

      v_PRICINGENTITYID number;

      v_agreement_id number;

       

       

         BEGIN

      -- V_PRICE :=550;

      p_amount :=1300;

      p_account_no := 1015473;

       

       

       

         select price,PRICINGENTITYID,agreement_id into v_price,v_PRICINGENTITYID,v_agreement_id from pt_agmt_pricing_entity

         where PRICINGENTITYID=(SELECT MAX(PRICINGENTITYID) FROM PT_AGMT_PRICING_ENTITY WHERE CHARGE_ACCOUNT_ID=p_account_no AND CHARGE_CODE='SC');

        

           if P_amount>=v_price  then

          

          

           

              update pt_agmt_pricing_entity b set price=p_amount

              where PRICINGENTITYID=(SELECT MAX(PRICINGENTITYID) FROM PT_AGMT_PRICING_ENTITY WHERE CHARGE_ACCOUNT_ID=p_account_no AND CHARGE_CODE='SC');

       

       

              UPDATE PT_AGMT_PKG_SVC_DTLS SET PRICE=p_amount

              WHERE AGREEMENT_ID=(SELECT AGREEMENT_ID FROM PT_AGMT_PRICING_ENTITY

              WHERE PRICINGENTITYID=(SELECT MAX(PRICINGENTITYID) FROM PT_AGMT_PRICING_ENTITY WHERE CHARGE_ACCOUNT_ID=p_account_no AND CHARGE_CODE='SC')) AND CHARGE_TYPE='R';

       

       

              commit;

             

              insert into premium_price_change_report values(p_account_no,v_PRICINGENTITYID,sysdate,P_amount,v_price,v_agreement_id);

             

              commit;

           

            else

           

            P_ERR_CODE := -1;

            P_ERR_MESG:='You cannot give the amount less than package amount';

           

           

           

       

       

          END IF;

         

          p_ret_var :=p_account_no;

       

        END

       

      error:>

       

      ORA-06550: line 58, column 0:

      PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

       

       

         ; <an identifier> <a double-quoted delimited-identifier>

      The symbol ";" was substituted for "end-of-file" to continue.

       

      Please help me to sort out the issue.Is something wrong with this proc...