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;