Ora 06502

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

Cause: An error occurred relating to arithmetic, numeric, string, conversion operations. When an attempt is made to assign an integer larger than 999 to a variable declared NUMBER(3) for example, or for a variable declared NOT NULL if an a user tries to assign the value NULL.

Action: Modify the data, how it is declared, or the operations on it to eliminate violations.

Description: Many data type and definition problems generate this message, with multiple instances shown. Example one illustrates a constraint violation when setting a "Not Null" variable to null. The second case shows the error when assigning a value larger than the variable definition.

    Case 1: declare
    w_string varchar2(3) not null :='NOT NULL FIELD';
    begin
    w_string := '';
    end;
    /
    ............
    declare
    *
    ERROR at line 1: ORA-06502: PL/SQL: numeric or value error:
    character string buffer too small
    ORA-06512: at line 2


    Case 2: declare
    w_number number(3);
    begin
    w_number := 9999;
    end;
    /
    .........
    declare
    *
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: number precision too large
    ORA-06512: at line 4


 

Tech Links (top)
What We Do
Download Free Trials
Specifications and Datasheets
Technology Whitepapers
Frequently Asked Questions
Tech Links (bottomn)
© Copyright 2008 Confio Software

Oracle Database

Oracle_Monitoring_Tools

SQL_Tuning_Tool

Oracle Tuning

Oracle_Tuning_Tools

Oracle_Performance

Oracle Monitoring

J2EE Performance Tools

Java Performance Tuning Tools

Database Tuning

Java Application Performance

oracle_9i_tuning

Database Monitoring

Database Performance

sql_performance_tuning

9i_performance_tuning

oracle_10g_tuning

sql_2000_performance_tuning

Denver Internet Marketing from Parallel Path

sql tuning

sql server tuning