Delete DML Operation
SYS.AnyData.ConvertDate(SYSDATE));
-- Apply row LCR as an INSERT into the
NY4.hist_deletes table
lcr.EXECUTE(true);
END IF;
END;
In the above procedure, the LCR event has
been altered as follows:
-
the command type has been changed to INSERT
-
the object_name has been changed to
hist_deletes
-
the command type has been changed to NY4
-
a new column named TIME_OF_DML has been
added and a value of SYSDATE has been assigned to it
The next step is the execution of the LCR
event. This has the effect of the inserting to a new table
called NY4.HIST_DELETES instead of the originally intended
ALLINSURED1 table.
The procedure can be assigned as the DML
Delete Handler by executing the following SQL statement:
-- To Assign Delete DML Handler, use the
following SQL block
BEGIN
DBMS_APPLY_ADM.SET_DML_HANDLER(
object_name => 'ny4.allinsured1',
object_type => 'TABLE',
operation_name => 'DELETE',
error_handler => false,
user_procedure =>
'ny4. write_del_lcrs',
apply_database_link => NULL,
apply_name => NULL);
END;
/