Home > database >  Oracle triggers, into a stored procedure
Oracle triggers, into a stored procedure

Time:10-04

The original demand is changed when certain fields in the table1, or to insert a record, in the table1 is to insert a record in table2, I use the trigger, the stored procedure is OK, has been running for,
The CREATE OR REPLACE the TRIGGER TRIGGER_TU_CUSTOME_INFO
AFTER the INSERT or UPDATE of the name, nation_user, idno, idtype, VALID_IDCARD
ON DBCUST. TU_CUSTOME_INFO
FOR EACH ROW

The BEGIN
IF updating THEN
Insert into antiml. AML_CUSTINFO_CHANGE (CUST_ID, CUST_TYPE) values (: new, CUST_ID, 'cust_update');
END the IF;
IF inserting THEN
Insert into antiml. AML_CUSTINFO_CHANGE (CUST_ID, CUST_TYPE) values (: new, CUST_ID, 'cust_add');
END the IF;
The EXCEPTION
The WHEN OTHERS THEN
DBMS_OUTPUT. PUT_LINE (' TT_BASE_MCHINFO ANTIML TRIGGER! ');
END;

Now because the table1 changes significantly, the trigger can't timing, all want to use a job implementation timing to execute a stored procedure, please change the stored procedure how to write???????
Hope everybody to give directions

CodePudding user response:

Probably use materialized log + + job regularly execute stored procedures

CodePudding user response:

The problem is the stored procedure can't write, for example is given

CodePudding user response:

This is a bit like you log table

trigger processing is a good wayIn addition, also can be in the front desk program processing

  • Related