Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01426: numeric overflow in cursor fetch

Abhinandan Yadav-OracleJul 1 2013 — edited Jul 1 2013

Hi All,

System throws ORA-01426 when cursor is fetched. Since cursor uses SUM(amount), I also verified the sum of amount it is within the range of data type NUMBER. Could any one suggest possible reason for the exception.

amount is of type NUMBER;

The code is as below:

CURSOR aging_col_total_csr IS

SELECT aging_bucket_id aging_bucket_id

,      aging_bucket_line_id aging_bucket_line_id

,      bucket_sequence_num bucket_sequence_num

,      org_id

,      SUM(amount) amount

FROM   ozf_aging_summary_all

GROUP BY aging_bucket_id

,        aging_bucket_line_id

,        bucket_sequence_num

,        org_id;

l_aging_col_total_rec  aging_col_total_csr%ROWTYPE;

--Error thrown here

OPEN aging_col_total_csr;

      LOOP

         FETCH aging_col_total_csr INTO l_aging_col_total_rec; -- Error is thrown here

         EXIT WHEN aging_col_total_csr%NOTFOUND

                OR aging_col_total_csr%NOTFOUND IS NULL;

          --processing the records, inserting in table

      END LOOP;

   CLOSE aging_col_total_csr;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 29 2013
Added on Jul 1 2013
1 comment
1,780 views