create or replace
PROCEDURE check_invalid_division As
tn_number2 test_numbers.number2%type;
tn_operation test_numbers.operation%type;
CURSOR crsr_test_numbers Is
select tn_number2 , tn_operation
from test_numbers
where tn_number2 = 0 AND upper( tn_operation ) = 'DIVIDE'
FOR UPDATE;
BEGIN
for test_num_row in crsr_test_numbers loop
update test_numbers
set operation = 'Divide - Invalid'
where current of crsr_test_numbers;
end loop;
END;
|