The following triggering event caused the result error, the implementation of the two data update ALTER TRIGGER "tr_shipper_line_in" AFTER INSERT ORDER 2 ON "DBA"."shipper_line" referencing new as new_shipper_line FOR each row BEGIN update shipper_line set create_time = getdate(*) where shipper_line.trans_no = new_shipper_line.trans_no and shipper_line.line_no = new_shipper_line.line_no; update customer set customer.user_7=customer.user_7-(new_shipper_line.quantity*part.user_10) from shipper,shipper_line,customer,part where shipper_line.trans_no = new_shipper_line.trans_no and shipper_line.line_no = new_shipper_line.line_no and shipper_line.trans_no=shipper.trans_no and shipper.customer_id=customer.customer_id and shipper_line.part_id=part.part_id and part.product_code ='XQ' END |
Change "update shipper_line ... ;" to "SET new_shipper_line.create_time = getdate();"
Also change "after insert" to "before insert" to be sure the modified data makes it into the new row.
thank you ROn emment !all right thanks Don't understand why, trigger the execution of the case is what circumstance