Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Triggers fails to compile. Why?

Triggers fails to compile. Why?

From: Helmut Daiminger <hdaiminger_at_vivonet.com>
Date: Thu, 24 Aug 2000 11:37:05 -0700
Message-Id: <10599.115501@fatcity.com>


Hi!

When I try to compile the trigger below, I get the error message:

PLS-00201: identifier 'SYS.V_$SESSION' must be declared

Why???? v$session is nothing but a synonym for v$_session. The user trying to compile this trigger has DBA privileges.

CREATE OR REPLACE TRIGGER TBREVENUECAT_TRIGGER_DEL AFTER DELETE ON VIVOUSER.TBREVENUECAT
FOR EACH ROW
BEGIN
   DECLARE myApplName varchar2(50);
   BEGIN

     SELECT PROGRAM into myApplName
     FROM v$session WHERE audsid = userenv('sessionid');
     IF Trim(Upper(myApplName))<>Trim('VIVOCLIENT.EXE') THEN
       INSERT INTO OM_TBREVENUECAT (OM_TRANSID, OM_TRANSTYPE,
OM_TRANSSTATUS, COMPANYID, STORELOCID, REVCATID, DEPTID, STATUS)
       VALUES (OM_IDS.NextVal, 'D', 'N', :OLD.COMPANYID, :OLD.STORELOCID,
:OLD.REVCATID, :OLD.DEPTID, :OLD.STATUS);
     END IF;

   END;
 END; Any ideas? Received on Thu Aug 24 2000 - 13:37:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US