how to check in a cursor if there is no data
436061Jan 10 2005 — edited Jan 18 2005I have declared a cursor in a statement lever trigger. Now when there are not records matching the select criteria, the trigger is throwing the error ora-01403: no data found and terminating...
after defining the cursor, in the body of the cursor, I am checking if the number of records found in cursor is zero or not...
but as of now, my trigger is not moving beyond the cursor declaration. How can I handle this situation?
cursor c1 is
select order_id, order_id_pred from order_dependency
where order_id=temp(0).order_id ;
begin
for x in c1
loop
order_id_count := order_id_count+1;
--this will give you the count of the rows in the cursor
end loop;
end...