I have this variable declaration
counter INTEGER := 0; /* loop counter */
And then there is for loop like
FOR counter IN 1 .. CEIL(records / batch)
LOOP
No sooner the execution point comes here it throws execption.
ORA-01086: savepoint 'SP1' never established in this session or is invalid
ORA-06512: at "MALI521.PRVSAPUPD", line 421
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 8
Now the SP1 savepoint is established in the for loop. The code is failing the moment it comes at for loop, since the counter variable there has NULL value.
Any idea?
PLEASE DELETE IT. I FIGURED IT OUT.
Are you sure
counteris the problem? what are the value ofrecordsandbatch