The create or replace the trigger t_ap_paybill after
Insert on ap_paybill for each row
Declare ii VARCHAR2 (101);
The begin
If: new def4='~'
Then
Select the name into the from ii bd_bankaccsub where pk_bankaccsub=(select pk_bankaccsub from bd_custbank where isdefault='Y' AND pk_cust=(select: supplier from ap_payitem where pk_paybill=: new. Pk_paybill));
The update ap_paybill set def4=ii where pk_paybill=: new. Pk_paybill;
End the if;
end;
Table A table, table B, C, A, B for the master table
Is this, I wrote A trigger, as long as it is for when A insert data in the table, according to the B in the table B field to find C in the table name and then assigned to A table def4
When I insert the data times wrong: a great god, please help solve, thank
ORA - 04091: table NC20170303. AP_PAYBILL changed, the trigger/function can't read it
ORA - 06512: the "NC20170303 T_APPAYBILL", line 4
ORA - 04088: the trigger 'NC20170303. T_APPAYBILL' error in the implementation process