我嘗試創建一個審計觸發器,它引發編譯錯誤。同時創建審計觸發器拋出警告作爲編譯錯誤
請你幫我創建觸發器..
DROP TRIGGER DB.DAT_CAMPLE_REQ_Test;
CREATE OR REPLACE TRIGGER DB."DAT_CAMPLE_REQ_Test"
AFTER insert or update or delete on DAT_CAMPLE_REQ
FOR EACH ROW
declare
dmltype varchar2(6);
BEGIN
if deleting then
INSERT INTO h_dat_cample_req VALUES (
:Old.REQUEST_ID,
:Old.SAMPLE_ID,
:Old.CASSAY_ID,
:Old.CASCADE_ID,
:Old.STATUS_ID,
:Old.AUTHOR,
:Old.CRT_SAE,
:Old.SCREEN_SAE
);
else
if inserting then
dmltype := 'insert';
elsif updating then
dmltype := 'update';
end if;
INSERT INTO h_dat_cample_req VALUES
(
:New.REQUEST_ID,
:New.SAMPLE_ID,
:New.CASSAY_ID,
:New.CASCADE_ID,
:New.STATUS_ID,
:New.AUTHOR,
:New.CRT_SAE,
:New.SCREEN_SAE
);
end if;
END;
你得到的錯誤將是一個很大的幫助。與編譯錯誤創建 – 2011-12-22 13:21:44
觸發...這是笏我越來越...... – user1111706 2011-12-22 14:01:55
要查看錯誤,請鍵入:'SHOW ERRORS TRIGGER DB.DAT_CAMPLE_REQ_Test' – 2011-12-22 14:39:45