Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> trigger error
I've created the following trigger but it keeps failing:
create or replace trigger license_usage
BEFORE DELETE on admuser.usession
FOR EACH ROW
DECLARE
v_type VARCHAR2(10);
BEGIN
IF UPDATING THEN
v_type := 'UPDATE'
ELSIF DELETING THEN
v_type := 'DELETE'
END IF;
UPDATE admuser.licenseaccess
set licenseaccess.last_active_time = usession.last_active_time
WHERE licenseacces.session_id = usession.session_id;
IF SQL%NOTFOUND THEN
INSERT INTO admuser.licenseaccess (user_id, session_id, login_time,
last_active_time)
select user_id, session_id, login_time, last_active_time from admuser.usession;
UPDATE admuser.licenseaccess
set user_name = (select user_name from admuser.users where
licenseaccess.user_id = users.user_id);
END IF;
END;
I get this error:
Line # = 10 Column # = 5 Error Text = PL/SQL: SQL Statement ignored Line # = 11 Column # = 42 Error Text = PLS-00201: identifier 'USESSION.LAST_ACTIVE_TIME' must be declared
all my tables belong to a user named admuser.
Any idea's? Received on Tue Jan 06 2004 - 13:13:45 CST