create or replace TRIGGER "SCHEMA"."UDS_CALL_LOG_INFO_BIU"
BEFORE INSERT OR UPDATEON "APEX_UDS"."UDS_CALL_LOG_INFO"
FOR EACH ROW
BEGIN
IF INSERTING THEN
IF :NEW.MASTER_ID IS NULL THEN
SELECT UDS_CALL_LOG_INFO_SEQ.NEXTVAL
INTO :NEW.MASTER_ID
FROM DUAL;
END IF;
:NEW.CREATED_DATE := LOCALTIMESTAMP;
:NEW.CREATED_BY:=nvl(v('APP_USER'),USER);
ELSIF UPDATING THEN
:NEW.EDIT_DATE := LOCALTIMESTAMP;
:NEW.EDITED_BY:=nvl(v('APP_USER'),USER);
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line ('An error was encountered '||SQLCODE||' -ERROR- '||SQLERRM);
END UDS_CALL_LOG_INFO_BIU;
No comments:
Post a Comment