ORA-01426: Numeric Overflow During Cube Build (Doc ID 1494869.1)

Our cube builds starting failing and we received this error after the cube log table sequence reached 32787.
After recreating the sequence the builds run successfully. This seems to be an unacceptable bug for an enterprise level product.
I have been unable to find a patch on the Oracle support site for it. Is a patch avaliable?
COMP_NAME
VERSION
OLAP Analytic Workspace
11.2.0.4.0
Oracle OLAP API
11.2.0.4.0
OLAP Catalog
11.2.0.4.0

I found what appears to be a related bug Bug 14627371 - ORA-01426: NUMERIC OVERFLOW DURING CUBE BUILD
.  This bug is marked as fixed in 12.1 of the database. 
I think that you may want to pursue this issue with support to see whether this can be back-ported ton 11.2.0.4.0.
--Ken Chin

Similar Messages

  • ORA-01426: numeric overflow when creating job

    Hello,
    When executing the following script to create a job I get the error "ORA-01426: numeric overflow" . When I execute the same script on another database with same version and same configuration I do not get the error and the job is created.
    Can anyone help me out solving this issue?
    Script:
    DECLARE
    X NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    ( job => X
    ,what => 'insert into dba.dba_logs values (''SGC'',''TRL03'',sysdate,null);
    commit;
    ,next_date => to_date('07-11-2010 02:00:00','dd/mm/yyyy hh24:mi:ss')
    ,interval => 'NEXT_DAY(TRUNC(SYSDATE)+2/24,''SUNDAY'')'
    ,no_parse => FALSE
    SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
    COMMIT;
    END;
    Database version: 11.2.0.1
    OS: HPUX

    We are planning to migrate to dbms_scheduler, but that's in the future. for now we have this error first to solve.
    We also tried the following with dbms_scheduler and it gives the same error. The strange is that in another database with same version and same OS it works fine.
    BEGIN
    SYS.DBMS_SCHEDULER.CREATE_JOB
    job_name => 'JOB_CLIENTES_IN'
    ,start_date => SYSTIMESTAMP
    ,repeat_interval => 'FREQ=MINUTELY;INTERVAL=10'
    ,end_date => NULL
    ,job_type => 'STORED_PROCEDURE'
    ,enabled => TRUE
    ,job_action => 'JOB_CLIENTES_FTP_IN'
    ,comments => 'Job que carrega os ficheiros de pre-aviso de cliente'
    END;
    ORA-01870: the intervals or datetimes are not mutually comparable
    ORA-01426: numeric overflow
    ORA-01426: numeric overflow
    ORA-06512: at "SYS.DBMS_ISCHED", line 124
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 271
    ORA-06512: at line 2
    Edited by: cibernauta on Nov 4, 2010 12:48 PM

  • Error message "ORA-01426: numeric overflow"

    Could somebody please explain with me examples as when you get this error.
    error message "ORA-01426: numeric overflow"
    Thank You for your help.

    You get 1426 when a number, usually from a caclulation, is too big, or too small for Oracle to represent. For example:
    SQL> SELECT POWER(99,99) FROM dual;
    SELECT POWER(99,99) FROM dual
    ERROR at line 1:
    ORA-01426: numeric overflowwhich my calculator tells me is 3.6973E+197
    TTFN
    John

  • ORA-01426: numeric overflow, while migrating "float" values

    When I try to insert a value of *2.58612749363472E302* (originally a "float" in SQL DB) into an Oracle column of type float(126), I get this error "ORA-01426: numeric overflow"
    I tried changing the column type to BINARY_FLOAT, BINARY_DOUBLE, but I still get same error.
    I'm using Oracle SQL Developer (2.1.1.64.45) to migrate a SQL Server 2005 Database to Oracle 11g.
    Do you have any thoughts on this? Or workarounds?
    Thanks in advance.
    Arul

    Arul,
    I have checked the Migration Workbench documentation where it says for float data -
    Oracle® SQL Developer
    Supplementary Information for Microsoft SQL Server and
    Sybase Adaptive Server Migrations
    Release 2.1
    Table 2–2 Data Types in Oracle and Microsoft SQL Server or Sybase Adaptive Server
    NOTE: If you try to migrate
    floating point data greater
    than or equal to 1.0E+126
    then SQL Developer will fail
    to insert this data in the
    Oracle database and1 will
    return an error.This also
    applies to negative values
    less than or equal to
    -1.0E+126.
    So, if I understand it correctly your value of 2.58612749363472E302 is outside this range.
    Regards,
    Mike

  • [Oracle][ODBC][Ora]ORA-01426: numeric overflow

    I have a function get data from data base and do some calculating. I call this function from ASP web page. Some times I got the following error. But if I click refresh later. It's ok again. Any ideas?
    [Oracle][ODBC][Ora]ORA-01426: numeric overflow

    Cause: Evaluation of an value expression causes an overflow/underflow.
    Action: Reduce the operands.

  • Urgent  : ORA-01426: numeric overflow on oracle 11g  Active Data Guard

    Hi
    I have configured Active Data Guard on oracle 11g, for reporting purpose we will select mutliple querry on target side(10 users). we are getting 'numeric overflow erro'r on alert log file When we issuing multiple query on target side. PLeae let me know is this error will cause performance degrad. if it will degrade performance mean please tell me how to resolve this problem. Why the numeric overflow is comming . and it is not comming in the primary database, it is comming in standby database only. please any one help it is very urgent
    is there any parameter To overcome this problme
    Please please it is very important to me and very urgent .
    Thanks
    nafees
    Edited by: Nafees on Jan 1, 2009 3:44 AM
    Edited by: Nafees on Jan 1, 2009 3:54 AM

    There is no one drowning.
    Your house is not on fire.
    The volcano has not exploded.
    Please apologize for abusing this forum by claiming your issue is more urgent than other people's requests.
    Then, and only then, should anyone help you. I know I certainly won't until I read your sincere apology and promise not to be abusive in the future.

  • Error ORA-01426: numeric overflow when Creating table with double data type

    Hi,
    I am using ODP.NET to create a table with data from SQL to Oracle. The problem is with double data type fields that is equivalent to FLOAT(49) in Oracle. My syntax is:
    CREATE TABLE SCOTT.ALLTYPES
    F1 NUMBER(10),
    F10 DATE,
    F2 NUMBER(10),
    F3 NUMBER(5),
    F4 NUMBER(3),
    F5 FLOAT(23),
    F6 FLOAT(49),
    F7 NUMBER (38,5),
    F8 NVARCHAR2(500),
    F9 NVARCHAR2(500)
    Th error is with field F6 but I am not sure what is the correct type equivalent to double in SQL.
    I woul appreciate if anyone can help me with this problem.
    Sunny

    Does this simple test work for you?
    In database:
    create table float_test
      f1 float(49)
    );C# code:
    using System;
    using System.Data;
    using System.Text;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace FloatTest
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
          // connect to local db using o/s authenticated account
          OracleConnection con = new OracleConnection("User Id=/");
          con.Open();
          // will hold the value to insert
          StringBuilder sbValue = new StringBuilder();
          // create a string of 49 number 9's
          for (int i = 0; i < 49; i++)
            sbValue.Append("9");
          // command object to perform the insert
          OracleCommand cmd = con.CreateCommand();
          cmd.CommandText = "insert into float_test values (:1)";
          // bind variable for the value to be inserted
          OracleParameter p_value = new OracleParameter();
          p_value.OracleDbType = OracleDbType.Double;
          p_value.Value = Convert.ToDouble(sbValue.ToString());
          // add parameter to collection
          cmd.Parameters.Add(p_value);
          // execute the insert operation
          cmd.ExecuteNonQuery();
          // clean up
          p_value.Dispose();
          cmd.Dispose();
          con.Dispose();
    }SQL*Plus after executing above code:
    SQL> select * from float_test;
            F1
    1.0000E+49
    1 row selected.- Mark

  • Autosolve during cube build

    Hello!
    Several days ago 14th of December 2008 we had run several cube builds. During these builds OLAP engine performs Data loading and Auto solve it was looking like this in XML_LOAD_LOG
    bq. +20:19:45 Running Jobs: AWXML$_2260_2120. Waiting for Tasks to Finish...+ \\ +20:19:45 Started 20 Finished 19 out of 20 Tasks.+ \\ +20:18:25 Finished Auto Solve for Measures: CAHTCA, CATCCA, MAPCCA, MCPCCA, QTPVCA, QTUNCA from Cube SALES.CUBE. PRT11 Partition.+ \\ +20:15:32 Started Auto Solve for Measures: CAHTCA, CATCCA, MAPCCA, MCPCCA, QTPVCA, QTUNCA from Cube SALES.CUBE. PRT10 Partition.+ \\ +20:15:32 Finished Load of Measures: CAHTCA, CATCCA, MAPCCA, MCPCCA, QTPVCA, QTUNCA from Cube SALES.CUBE. PRT10 Partition. Processed 644523 Records. Rejected 1071 Records.+ \\ +20:14:03 Finished Auto Solve for Measures: CAHTCA, CATCCA, MAPCCA, MCPCCA, QTPVCA, QTUNCA from Cube SALES.CUBE. PRT09 Partition.+ \\ +20:12:19 Started Load of Measures: CAHTCA, CATCCA, MAPCCA, MCPCCA, QTPVCA, QTUNCA from Cube SALES.CUBE. PRT10 Partition.+ \\ +20:12:15 Attached AW SALES.SALES3 in MULTI Mode.+
    Now OLAP engine refuses to perform Auto solve during build. So log looks like this:
    bq. +15:28:19 Finished Parallel Processing.+ \\ +15:28:18 Finished Load of Measures: CAHTCA, CATCCA, MAPCCA, MCPCCA, QTPVCA, QTUNCA from Cube SALES.CUBE. PRT10 Partition. Processed 15910 Records. Rejected 0 Records.+ \\ +15:28:12 Finished Load of Measures: CAHTCA, CATCCA, MAPCCA, MCPCCA, QTPVCA, QTUNCA from Cube SALES.CUBE. PRT11 Partition. Processed 12104 Records. Rejected 0 Records.+ \\ +15:28:09 Started Load of Measures: CAHTCA, CATCCA, MAPCCA, MCPCCA, QTPVCA, QTUNCA from Cube SALES.CUBE. PRT10 Partition.+ \\ +15:28:08 Attached AW SALES.SALES3 in MULTI Mode.+ \\ +15:28:08 Finished Load of Measures: CAHTCA, CATCCA, MAPCCA, MCPCCA, QTPVCA, QTUNCA from Cube SALES.CUBE. PRT09 Partition. Processed 15193 Records. Rejected 0 Records.+ \\ +15:28:07 Running Jobs: AWXML$_2801_2412, AWXML$_2801_2413, AWXML$_2801_2414.+ \\ +15:28:07 Started 14 Finished 11 out of 14 Tasks.+ \\ +15:28:03 Finished Load of Measures: CAHTCA, CATCCA, MAPCCA, MCPCCA, QTPVCA, QTUNCA from Cube SALES.CUBE. PRT07 Partition. Processed 21047 Records. Rejected 0 Records.+ \\ +15:28:02 Attached AW SALES.SALES3 in MULTI Mode.+ \\ +15:28:02 Started Load of Measures: CAHTCA, CATCCA, MAPCCA, MCPCCA, QTPVCA, QTUNCA from Cube SALES.CUBE. PRT11 Partition.+
    We did not change anything.
    Cube settings are the same - Use Default Aggregation plan for Cube Aggregation
    Scripts are the same with TrackStatus=true and RunSolve=true -
    bq. declare \\ +     xml_clob clob;+ \\ +     xml_str varchar2(4000);+ \\ +     isAW number;+ \\ +     begin+ \\ +     DBMS_LOB.CREATETEMPORARY(xml_clob,TRUE);+ \\ +     dbms_lob.open(xml_clob, DBMS_LOB.LOB_READWRITE);+ \\ +     dbms_lob.writeappend(xml_clob, 183, ' &lt;BuildDatabase Id="Action6" AWName="SALES.SALES3" BuildType="EXECUTE" RunSolve="true" CleanMeasures="false" CleanAttrs="false" CleanDim="false" TrackStatus="true" MaxJobQueues="0"&gt;');+ \\ +     dbms_lob.writeappend(xml_clob, 39, ' &lt;BuildList XMLIDref="SALES.CUBE" /&gt;');+ \\ +     dbms_lob.writeappend(xml_clob, 18, ' &lt;/BuildDatabase&gt;');+ \\ +     dbms_lob.close(xml_clob);+ \\ +     xml_str := sys.interactionExecute(xml_clob);+ \\ +     dbms_output.put_line(xml_str);+ \\ +     end;+
    Why OLAP engine refuses do Solve measures during build? Of course it is possible to do solve separately, but why it suddenly stops to perform it?
    Thank you for your help.
    Regards,
    Kirill Boyko

    Hello!
    It seems VERY strange but PRSALES performs normally. It does Autosolve.
    22-JAN-09 12.17.34     12:17:34 Finished Parallel Processing.
    22-JAN-09 12.17.34     12:17:34 Completed Build(Refresh) of SALES.SALES3 Analytic Workspace.
    22-JAN-09 12.17.33     12:17:33 Finished Auto Solve for Measures: CAHTPR, CATCPR, MAPCPR, MCPCPR, QTPVPR, QTUNPR from Cube PRSALES.CUBE. PRT10 Partition.
    22-JAN-09 12.16.49     12:16:49 Finished Auto Solve for Measures: CAHTPR, CATCPR, MAPCPR, MCPCPR, QTPVPR, QTUNPR from Cube PRSALES.CUBE. PRT11 Partition.
    22-JAN-09 12.14.07     12:14:07 Finished Auto Solve for Measures: CAHTPR, CATCPR, MAPCPR, MCPCPR, QTPVPR, QTUNPR from Cube PRSALES.CUBE. PRT09 Partition.
    22-JAN-09 12.13.40     12:13:40 Finished Auto Solve for Measures: CAHTPR, CATCPR, MAPCPR, MCPCPR, QTPVPR, QTUNPR from Cube PRSALES.CUBE. PRT07 Partition.
    22-JAN-09 12.12.30     12:12:30 Finished Load of Measures: CAHTPR, CATCPR, MAPCPR, MCPCPR, QTPVPR, QTUNPR from Cube PRSALES.CUBE. PRT10 Partition. Processed 1696 Records. Rejected 0 Records.
    22-JAN-09 12.12.30     12:12:30 Started Auto Solve for Measures: CAHTPR, CATCPR, MAPCPR, MCPCPR, QTPVPR, QTUNPR from Cube PRSALES.CUBE. PRT10 Partition.
    22-JAN-09 12.12.22     12:12:22 Started Load of Measures: CAHTPR, CATCPR, MAPCPR, MCPCPR, QTPVPR, QTUNPR from Cube PRSALES.CUBE. PRT10 Partition.
    22-JAN-09 12.12.22     12:12:22 Running Jobs: AWXML$_2935_2495, AWXML$_2935_2496, AWXML$_2935_2497, AWXML$_2935_2498.
    Regards,
    Kirill Boyko

  • OLAP error leading to  a corrupted AW during cube build

    Hi all
    My cube load keeps on crashing and the result is a corrupted AW. Sometimes it happens, sometimes it doesn't, thus it is very hard to pin point the cause of the problem
    I would like to emphasize that the Alert log and trace files contain general info about the issue but does not help in resolving the problem.
    Let me explain what is happening.
    I have 6 cubes A, B, C, D , E and F in "MY_AW" and all the cubes are populated via a single dbm_cube.build call as shown below
    DBMS_CUBE.BUILD('CUBE_A, CUBE_B, CUBE_C, CUBE_D, CUBE_E , CUBE F', 'C', FALSE, 5, TRUE, TRUE, FALSE);
    Here is a brief description of the cube structure
    a) CUBE_A, CUBE_B CUBE_C are partitioned along dimension A_A ( i.e. along the same dimension)
    b) CUBE_D is partitioned along dimension B_B ( i.e. along a different dimension)
    c) CUBE_E and CUBE_F' are NOT partitioned ( These cubes are really tiny, thus no need partitioning them)
    All 6 cubes are loaded on a daily basis. Initial reload load is always without any issues. Then the next , say 3 incremental loads would run successfully too.
    After that, any further incremental load generates an Oracle error ( as shown below) and the result is a corrupted AW.
    It is really frustrating because the error is inconsistent( i.e does not surface always) , although the cube structure is constant across all loads..
    Can anybody figure out what is happening here?
    Any help would be highly appreciated.
    ERROR at line 1:
    ORA-37162: OLAP error
    XOQ-01707: Oracle job "JOB$_7041" failed while executing slave build "*CUBE_F* USING (LOAD NO SYNCH, SOLVE) AS OF SCN 11027959160835" with error "37162: ORA-37162: OLAP error
    XOQ-00703: error executing OLAP DML command "(AW ATTACH MY_AW RO : ORA-01403: no data found )"
    ORA-06512: at "SYS.DBMS_CUBE", line 234
    ORA-06512: at "SYS.DBMS_CUBE", line 316
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_CUBE", line 234
    ORA-06512: at "SYS.DBMS_CUBE", line 287
    ORA-06512: at line 3
    Edited by: user9018701 on Jun 11, 2011 4:50 AM

    One recent source of AW corruption is
    BUG 8664896 - ORA-20000: ORU-10027: BUFFER OVERFLOW - AW VALIDATE
    A characteristic error of this bug (which you may see in the alert log) is
    +ORA-00600: internal error code, arguments: [xspggepGenPSErase05], [], [], []+
    This is fixed in the most recent 11g patches, as described by metalink note 1078454.1, so apply these may clear up the issue.
    I also see that you selecting the 'atomic' option in your call to dbms_cube.build. This means you may be a victim of
    BUG 11795047 - USING OLAP "ROLLBACK TO FREEZE" CAN DAMAGE AW
    The issue is that if you choose to run an atomic build and any error occurs during a slave process, then your AW may end up being corrupted. Choosing FALSE for the atomic argument would not fix the underlying error, but it may stop the subsequent AW corruption. As of writing the fix for this bug is not part of any public OLAP patch, so you would need to get a one-off patch through a service request.
    In either case I think a service request would be appropriate here since this is a serious error. You can mention my name if you like and I will help direct the problem to the appropriate developers.

  • Numeric overflow error in proc

    hi guys
    while executing below proc i am getting error numeric overflow at lineno 36.. please help me.
    ORA-01426: numeric overflow
    Thanks & Regards
    ************************************Proc Code******************************************************
    create or replace PROCEDURE proc_tab1 IS
    V_Rlt varchar2(4);
    cursor c1 is
    select a.ref,b.key_ref from a,b where a.ref(+) = b.ref;
    cursor c2 is
    select x.id||x.dt_key, x.d_value from x, y
    where y.s_ref = 'ML21' and y.id = 'RT' and x.f_ref = y.s_ref;
    type curr is table of c1%rowtype;
    c_table curr;
    type curr2 is table of c2%rowtype;
    c2_table curr2;
    begin
    open c1;
    loop
    fetch c1 bulk collect into c_table;
    exit when c1%NOTFOUND;
    end loop;
    open c2;
    loop
    fetch c2 bulk collect into c2_table;
    exit when c2%NOTFOUND;
    end loop;
    for i in 1..c_table.count
    loop
    if c2_table.exists(c_table(i).ref||c_table(i).key_ref)---after concat value length is 16
    then
    v_rlt := c2_table(c_table(i).ref||c_table(i).key_ref).d_value;
    else
    v_rlt :='R';
    end if;
    insert into tab1 (ref,rlt) values(c_table(i).ref,v_rlt);
    end loop;
    end;

    lineno 36can you please highlight which is the exact line where you get the error?
    Please post your code using ** tags.                                                                                                                                                                                                                                                                   

  • Raising ora-01426 error while truncating table

    Hi,
    We have a procedure which executes in the following process for few set of tabls
    1. disables the constraints
    2. truncating the tables
    3. enabling the constraints
    but after processing for 5 tables, while truncating the error throws
    BEGIN <procedure name >; END;
    ERROR at line 1:
    ORA-01426: numeric overflow
    ORA-06512: at "<procedurename> ", line 33
    ORA-06512: at line 1
    this line 33 point to execute immeidate 'truncate table < table name>
    Can i know what would be reason for throwing ' numeric overflow' error while truncating table..
    Thanks in advance

    user9080289 wrote:
    thanks.
    My oracle verision is 11gThen you could have the bug described there. Follow the instruction how to workaround (monitoring flush, set stats to low value) or apply the patch #8226471.
    Nicolas.

  • Unexpected Numeric Overflow on empty tables when scanning with DMU

    I have an instance of oracle running on an isolated network (oracle 11.2.0.3), on a Windows Server 2008 r2, x64 dell R705 server
    When using the DMU to scan tables, I get the following error:
    ORA-01426: numeric overflow
    DBMS_DUMA_INTERNAL: line 8
    DBMS_DUMA_INTERNAL: line 43
    at line 1
    I get his on multiple tables, but in each case, the table is empty (0 rows)
    Can I safely ignore this?  How do I get DMU to ignore the errors and continue?
    Thanks in advance.

    The fix for bug 8743409 is not included in the 11.2.0.1 release. Please check the DMU supported configurations. In order to use DMU on any versions of the database before 11.2.0.3, you need to apply a prerequisite server-side patch on one of the supported configurations. If you can upgrade to 11.2.0.3, there is no need to apply additional patches and the aforementioned fix is included.

  • Numeric overflow with DBMS_CDC_PUBLISH.CREATE_CHANGE_TABLE

    Hello all-
    I'm running Oracle 9i on WinXP sp. 2.
    I'm trying to create a CDC table with the standard SYS package and am getting a numeric overflow error. The code I'm attempting to execute is this:
    BEGIN
    sys.dbms_cdc_publish.create_change_table(
    OWNER => 'CDC_USER',
    CHANGE_TABLE_NAME => 'PA_BUDGET_ENTRY_METHODS',
    CHANGE_SET_NAME => 'SYNC_SET',
    SOURCE_SCHEMA => 'PA',
    SOURCE_TABLE => 'PA_BUDGET_ENTRY_METHODS',
    COLUMN_TYPE_LIST => 'BUDGET_ENTRY_METHOD_CODE VARCHAR2(30)',
    CAPTURE_VALUES => 'NEW',
    RS_ID => 'N',
    ROW_ID => 'Y',
    USER_ID => 'Y',
    TIMESTAMP => 'Y',
    OBJECT_ID => 'N',
    SOURCE_COLMAP => 'N',
    TARGET_COLMAP => 'N',
    OPTIONS_STRING => NULL);
    END;
    The error I'm getting is this:
    ORA-01426: numeric overflow
    ORA-06512: at "SYS.DBMS_CDC_PUBLISH", line 299
    ORA-06512: at line 2
    This happens every time, regardless of the source table i'm trying to capture changes for.
    Clearly this is a normal exception (i.e., not only thrown in the CDC packages) so I'm having a hard time figuring out what it could be. Anyone out there familiar with CDC have any thoughts?
    Thanks in advance,
    James

    I tried that but no luck yet, also tried put all in a single line, but the same error. It doesn't something tricky here, but actual problem with package. "ddl_markers" is new to 11g and not much documentation is available on that.
    Also setting ddl_markers=N removed 3 columns from Publisher table, and the effect of it on Subscriber's view is still a gray area,

  • Function - numeric Overflow error

    Dear All,
    I have a function that is causing a ORA-01426: numeric overflow error
    My values from the variables are as follows
    v_highest_Uprn is 10033233499
    v_start_uprn is 10033223500
    Any ideas how to fix this. Thanks in advance.
    FUNCTION get_next_uprn RETURN NUMBRT IS
    /* Loop through numbers betweeen the next_uprn and the highest in the active range. */
    /* Check to see if the new uprn exists in the database , if no rows returns then return the new uprn. */
    v_start_uprn NUMBER;
    v_highest_uprn NUMBER;
    v_uprn_exists NUMBER;
    v_new_uprn NUMBER;
    BEGIN
    SELECT next_uprn ,
    highest_uprn
    INTO v_start_uprn,v_highest_uprn
    FROM PD_PROPERTY_NUMBERS
    WHERE active_sequence = '*';
    v_new_uprn :=v_start_uprn ;
    FOR rec IN v_start_uprn..v_highest_uprn LOOP
    IF v_new_uprn > v_highest_uprn THEN
    Bs7666_Standard.bs7666_error(35635);
    END IF;
    SELECT uprn INTO v_uprn_exists
    FROM PD_BLPUS
    WHERE uprn = v_new_uprn;
    v_new_uprn := v_new_uprn + 1;
    END LOOP;
    RETURN v_new_uprn;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    RETURN v_new_uprn;
    END get_next_uprn;

    Hi
    The loop control variable in a FOR loop is an integer (or similar) it seems; those numbers are simply too big for it.
    Change your code to something like:
    FOR rec IN 1 .. v_highest_uprn - v_start_uprn + 1 LOOP
    Luis

  • Function  giving numeric overflow

    When i call this function with parameter-
    6244628707
    i get this error-numeric overflow.
    CREATE OR REPLACE FUNCTION TATA_ICR.isprime (p_number NUMBER)
    RETURN NUMBER
    IS
    BEGIN
    IF p_number = 3 or p_number=1
    THEN
    RETURN 1;
    END IF;
    FOR i IN 3 .. p_number - 1
    LOOP
    IF MOD (p_number, i) = 0
    THEN
    RETURN 0;
    END IF;
    END LOOP;
    RETURN 1;
    END;
    /

    Well, see the example and read the documentation!.
    SQL> BEGIN
      2   --The limit of BINARY_INTEGER/PLS_INTEGER is 2,147,483,647
      3   FOR i IN 1..2147483648 LOOP --1 added to the upper limit.
      4    NULL;
      5   END LOOP;
      6  END;
      7  /
    BEGIN
    ERROR at line 1:
    ORA-01426: numeric overflow
    ORA-06512: at line 3
    SQL> This is something do with this statements in the documentation
    indexName for the implicitly declared integer variable that is local to the FOR LOOP statement. Statements outside the loop cannot reference index. Statements inside the loop can reference index, but cannot change its value. After the FOR LOOP statement runs, index is undefined.

Maybe you are looking for