[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

ORA-06502: PL/SQL: numeric or value error

Asked by mohammadzahid in Databases Miscellaneous

Tags: numeric, value, error

Hello,

I am getting error when executing a stand alone procude in sqlplus:

ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "MPLS_DEV.PVC_VALIDATION_EXCEPTIONS", line 91
ORA-06512: at line 1

Can someone please help resolve this error and explain why this error is occuring.

Thanks!!

CREATE OR REPLACE PROCEDURE Pvc_Validation_Exceptions
AS

    v_ne_id            PVC.NETWORK_ELEMENT_ID%TYPE;
      v_ne_name          PVC.NETWORK_ELEMENT_NAME%TYPE;
      v_ne_expiry_date   PVC.PVC_EXPIRY_DATE%TYPE;
      v_int_desc         PVC.INTERFACE_DESCRIPTOR%TYPE;
      v_pvc_ind          PVC.PVC_IND%TYPE;
      v_hub_neid         PVC.HUB_NETWORK_ELEMENT_ID%TYPE;
      v_rmt_ne_id        PVC.RMT_NETWORK_ELEMENT_ID%TYPE;      
      v_count1 PLS_INTEGER := 0;
      
      
      /* 20004 - Check if an active CIU in network_element is not in iol.nh_statistics_lan_wan table */
      CURSOR c1_ciuactive
      IS
      SELECT COUNT(*)
            ,network_element_name
    FROM   customer.NETWORK_ELEMENT
      WHERE ne_status = 'Active'
      AND customer_id = 777776
      AND network_element_id  
      NOT IN
      (SELECT network_element_id FROM iol.NH_STATISTICS_LAN_WAN)
      GROUP BY
            network_element_name;      
             
   
    /* 20005 -  Check if CIU and DLCI in PVC table are not in IOL.NH_STATISTICS_LAN_WAN table */
    CURSOR c1_ciuvalidation
      IS
      SELECT COUNT(*)
            ,NETWORK_ELEMENT_id
              ,network_element_name
              ,interface_descriptor
      FROM PVC
      WHERE network_element_id
      NOT IN
        (SELECT NETWORK_ELEMENT_id FROM iol.NH_STATISTICS_LAN_WAN)
      GROUP BY
             NETWORK_ELEMENT_id
              ,network_element_name
              ,interface_descriptor              
      ORDER BY 3;
      
    /* 20006 - Find if duplicate Remote Entry exist in the PVC table */
    CURSOR c1_pvcduplicate
      IS
      SELECT COUNT(*)
            ,network_element_id
              ,network_element_name
              ,interface_descriptor
              ,pvc_ind
              ,hub_network_element_id
      FROM PVC
      WHERE network_element_id = network_element_id
      AND network_element_name = network_element_name
      AND pvc_ind = pvc_ind
      AND hub_network_element_id = hub_network_element_id
      AND interface_descriptor = interface_descriptor
      GROUP BY network_element_id
              ,network_element_name
                  ,interface_descriptor
                  ,pvc_ind
                  ,hub_network_element_id;
                  
   /* 20007 - Check if PVC record is expired in IOL.PVC table and it is in IOL.NH_STATISTICS_LAN_WAN table */
    CURSOR c1_pvcexpired
      IS
      SELECT COUNT(*)
            ,rmt_network_element_id
              ,v_ne_name
              ,v_int_desc              
      FROM PVC
      WHERE PVC_expiry_date IS NOT NULL
      AND rmt_network_element_id
      IN
        (SELECT network_element_id FROM iol.NH_STATISTICS_LAN_WAN)
      GROUP BY rmt_network_element_id
              ,v_ne_name
                ,v_int_desc;

                  
BEGIN
     
    /* Check if CIU is in network_element table and "Active", not in iol.nh_statistics_lan_wan table */
     OPEN c1_ciuactive;
         LOOP
           FETCH c1_ciuactive INTO v_count1, v_ne_name;
             EXIT WHEN c1_ciuactive%NOTFOUND;            
             IF v_count1 > 0 THEN
             INSERT
             INTO mpls_dev.CUSTOMER_EXCEPTIONS(CUSTOMER_ID
                                              ,PROCESS_NAME
                          ,CODE_UNIT_NAME
                          ,ERROR_ID
                         ,QUALIFER_TYPE
                                   ,QUALIFIER_VALUE
                                   ,CREATE_DATE_TIME
                         ,EXCEPTION_DATE)
            VALUES                 (777776
                                    ,'Data Load'
                         ,'IOL_DATA_EXCEPTIONS'
                         ,20004
                         ,'Network Element Name'
                         ,v_ne_name
                         ,NULL
                         ,SYSDATE);                                                                    END IF;
            END LOOP;
        CLOSE c1_ciuactive;
    COMMIT;
      
      
    /* Check if CIU and DLCI in PVC table are not in IOL.NH_STATISTICS_LAN_WAN table */
        OPEN c1_ciuvalidation;
          LOOP
              FETCH c1_ciuvalidation INTO v_count1, v_ne_id, v_ne_name, v_int_desc;
              EXIT WHEN c1_ciuvalidation%NOTFOUND;
              IF v_count1 > 0 THEN
              INSERT
              INTO mpls_dev.CUSTOMER_EXCEPTIONS(CUSTOMER_ID
                                              ,PROCESS_NAME
                                           ,CODE_UNIT_NAME
                          ,ERROR_ID
                          ,QUALIFER_TYPE
                          ,QUALIFIER_VALUE
                         ,CREATE_DATE_TIME
                         ,EXCEPTION_DATE)
      VALUES                                      (777776
                        ,'Data Load'
                        ,'IOL DATA EXCEPTIONS'
                        ,20005
                        ,'PVC Name'
                        ,v_ne_name ||'-'||v_int_desc
                        ,NULL
                        ,SYSDATE);
              END IF;
            END LOOP;
         CLOSE c1_ciuvalidation;
       COMMIT;       
      
      
   /* Find if duplicate Remote Entry exist in the PVC table */
       OPEN c1_pvcduplicate;
         LOOP
           FETCH c1_pvcduplicate INTO v_count1, v_ne_id, v_ne_name, v_int_desc, v_pvc_ind, v_hub_neid;
             EXIT WHEN c1_pvcduplicate%NOTFOUND;
             
             IF v_count1 > 1 THEN              
             INSERT
             INTO mpls_dev.CUSTOMER_EXCEPTIONS(CUSTOMER_ID
                                              ,PROCESS_NAME
                          ,CODE_UNIT_NAME
                          ,ERROR_ID
                         ,QUALIFER_TYPE
                         ,QUALIFIER_VALUE
                         ,CREATE_DATE_TIME
                         ,EXCEPTION_DATE)
                   VALUES             (777776
                          ,'Data Load'
                          ,'IOL DATA EXCEPTIONS'
                          ,20006
                         ,'PVC Name'
                         ,v_ne_name ||'-'||v_int_desc
                         ,NULL
                         ,SYSDATE);
              END IF;
            END LOOP;
        CLOSE c1_pvcduplicate;
       COMMIT;
      
      /* Check if PVC record is expired in IOL.PVC table and it is in IOL.NH_STATISTICS_LAN_WAN table */
       OPEN c1_pvcexpired;
         LOOP
           FETCH c1_pvcexpired INTO v_count1, v_rmt_ne_id, v_ne_name, v_int_desc;
             EXIT WHEN c1_pvcexpired%NOTFOUND;
             
             IF v_count1 > 2 THEN              
             INSERT
            INTO mpls_dev.CUSTOMER_EXCEPTIONS(CUSTOMER_ID
                                              ,PROCESS_NAME
                         ,CODE_UNIT_NAME
                         ,ERROR_ID
                         ,QUALIFER_TYPE
                        ,QUALIFIER_VALUE
                         ,CREATE_DATE_TIME
                         ,EXCEPTION_DATE)
      VALUES                  (777776
                        ,'Data Load'
                        ,'IOL DATA EXCEPTIONS'
                        ,20007
                        ,'PVCExpired PVC found in the PVC table'
                        ,v_ne_name ||'-'||v_int_desc
                        ,NULL
                        ,SYSDATE);
              END IF;
            END LOOP;
        CLOSE c1_pvcexpired;
       COMMIT;
END;
/
[+][-]04/19/05 07:00 PM, ID: 13820930Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04/19/05 07:18 PM, ID: 13820987Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/05 07:29 PM, ID: 13821011Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/05 07:30 PM, ID: 13821012Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/05 08:35 PM, ID: 13821205Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Databases Miscellaneous
Tags: numeric, value, error
Sign Up Now!
Solution Provided By: jrb1
Participating Experts: 2
Solution Grade: A
 
[+][-]04/19/05 08:43 PM, ID: 13821232Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/05 09:09 PM, ID: 13821330Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/05 09:15 PM, ID: 13821346Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/05 09:39 PM, ID: 13821407Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89