The table is tied to itself A positive entry movement and a negative exit movement associate all of the positive movements with all of their negative movements With every new addition I want to Total all the negative movements of the positive movements
When I try to enter a new value into the table, an error appears in the trigger, and I do not know the reason even though there are no errors in the SQL statements
error during execution of trigger 'AMMAR.ITEMS_MOVE_DETAILl_TRIGGER
create or replace trigger ITEMS_MOVE_DETAIL1_trigger
after insert
on ITEMS_MOVE_DETAIL1
for each row
declare
sumqu float;
begin
select sum(quantity)
into sumqu
from ITEMS_MOVE_DETAIL1
where self_id = :new.self_id;
update ITEMS_MOVE_DETAIL1
set drawn_quantity = sumqu
where swid = :new.self_id;
end ITEMS_MOVE_DETAIL1_trigger;