Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> triggers
Hi,
I have this trigger:
CREATE OR REPLACE TRIGGER "SYS"."LICENSE_USAGE"
BEFORE DELETE OR UPDATE
ON "ADMUSER"."USESSION"
FOR EACH ROW BEGIN
INSERT INTO admuser.licenseaccess (user_id, session_id, login_time,
last_active_time)
values(:OLD.user_id,:OLD.session_id, :OLD.login_time,
:OLD.last_active_time);
update admuser.licenseaccess
set user_name =
(select user_name from admuser.users
where user_id = licenseaccess.user_id);
update admuser.licenseaccess
set named_user_flag =
(select named_user_flag from admuser.usereng
where user_id = licenseaccess.user_id and db_engine_type = 'PM');
END; This triggers works but I'm trying to get the trigger to write to my table when there has been an entry made. I don't want any duplicates either. Any suggestions?
thanks Received on Wed Apr 14 2004 - 09:05:15 CDT