Cause:
The error ORA-06052: PL/SQL: numeric or value error would be found when using for loop on the type collection object, as shown below, and the collection is empty:
FOR i IN type_variable.FIRST..t_variable.LAST LOOP
----your code
End Loop ;
When the collection is not empty, error ORA-06052: PL/SQL: numeric or value error would not be found.
This is because FIRST and LAST return the first and last (smallest and largest) index numbers in a collection that uses integer subscripts.
Solution:
Use FOR i IN 1..t_variable.count instead of FOR i IN type_variable.FIRST..t_variable.LAST , and also apply exception block.
BEGIN
FOR i IN 1..t_variable.count
----your code
End Loop;
EXCEPTION WHEN OTHERS
-- error handling code
END;
Counting my Zero Days
-
I have decided to start keeping track of how many Zeroes I am able to
accumulate in a day.
My "Zero Day" is not the same as the hacker zero day concept.
I...
7 years ago
0 comments:
Post a Comment