I have a oracle procedure which selects data and insert into another table. Bellow is the code.
CREATE OR REPLACE PROCEDURE "CUSTOMER_INCREMENTAL" (
IS
BEGIN
INSERT INTO NDB_AML_CUSTOMER
(ID, TITLE,...)
SELECT ID, TITLE,...
FROM NDB_CUSTOMER_NEW
WHERE DATE_TIME > (SELECT RUN_DATE FROM CHECK_POINT WHERE TABLE_NAME = 'NDB_CUSTOMER_NEW');
UPDATE CHECK_POINT SET RUN_DATE = SYSDATE WHERE TABLE_NAME = 'NDB_CUSTOMER_NEW';
COMMIT;
END;
/
I want to know how to output the events into a table. Like Process Start Time Stamp, Process End Time Stamp & in an exception what error msg. So there will be two columns like Date and Message in the Log Table. Any suggestions?