This discussion is archived
1 2 Previous Next 18 Replies Latest reply: Dec 11, 2012 8:39 AM by 643412 RSS

identifier must be declared...don't understand.

643412 Newbie
Currently Being Moderated
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE     11.2.0.3.0     Production
TNS for Solaris: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production


I'm trying to build a trigger....and I'm getting the following errors:
[Warning] ORA-24344: success with compilation error
40/13   PLS-00201: identifier 'NRV_PARSE_SPATIAL.UNLINK_STAND' must be declared
40/13   PL/SQL: Statement ignored
42/13   PLS-00201: identifier 'NRV_PARSE_SPATIAL.UNLINK_PLOT' must be declared
42/13   PL/SQL: Statement ignored
52/7    PLS-00201: identifier 'NRV_UTILS.AUDIT_TABLE' must be declared
52/7    PL/SQL: Statement ignored
58/7    PLS-00201: identifier 'NRV_UTILS.AUDIT_TABLE' must be declared
58/7    PL/SQL: Statement ignored
 (3: 0): Warning: compiled but with compilation errors
Here is the script:
CREATE OR REPLACE TRIGGER FSDBA.NRV_SETMEAS_DEL_TRG
AFTER DELETE
ON NRV_SETTING_MEASUREMENTS
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE

v_checked_out_status varchar2(16);
v_checked_out_by     varchar2(30);
v_checked_out_date   date;

BEGIN
IF :old.level_1_alias = 'STAND'
THEN
   nrv_parse.location_checked_out (nvl(:old.setmeas_cn_of,:old.cn)
            ,null,null,null,null
            ,v_checked_out_status,v_checked_out_by,v_checked_out_date);

   IF v_checked_out_status is not null
   THEN
      IF v_checked_out_status = 'CHECK-IN PENDING'
         -- NOTE:  the Spatial client does not initiate any deletes as of now,
         --        however this IF was added in case Spatial does do deletes
         --        in the future, then the delete will be allowed.
         --
         -- The 'CHECK-IN PENDING' status is set only during the Spatial
         -- check-in process, it is never committed, so is only visible
         -- to the Oracle connection doing the check-in
      THEN
         -- allow the delete if 'CHECK-IN PENDING'
         null;
      ELSE
         -- if we get here it means the location for this exam is checked out
         -- and we cannot delete a stand or plot if the location is checked out
         Raise_Application_Error (-20000,'ERROR: A record cannot be deleted on an exam that was spatially checked out by '||v_checked_out_by||' on '||v_checked_out_date);
      END IF;
   ELSE
      -- extra processing if spatial_link = 'L' but location is not checked out
      -- NOTE: the PDR is not allowed to reload any spatial_link L records, but
      --       this trigger is not preventing it because the PDR software is.
      IF :old.spatial_link = 'Y'
      THEN
         IF :old.setmeas_cn_of is null
         THEN
            nrv_parse_spatial.unlink_stand (:old.vpdunit_id,:old.fsveg_id);
         ELSE
            nrv_parse_spatial.unlink_plot (:old.vpdunit_id,:old.fsveg_id);
         END IF;
      END IF;
   END IF;
END IF;
-- audit
IF :old.setmeas_cn_of is null
THEN
   IF sys_context('USERENV','ACTION') is null
   THEN
      nrv_utils.audit_table
          (:old.vpdunit_id||','||:old.level_1_alias||',CN='||:old.cn||
           ',SID='||:old.setting_id||
           ','||sys_context('USERENV','MODULE')
          ,'NRV_SETTING_MEASUREMENTS','DELETE');
   ELSE
      nrv_utils.audit_table
          (:old.vpdunit_id||','||:old.level_1_alias||',CN='||:old.cn||
           ',SID='||:old.setting_id||
           ','||sys_context('USERENV','MODULE')||
           ','||sys_context('USERENV','ACTION')
          ,'NRV_SETTING_MEASUREMENTS','DELETE');
   END IF;
END IF;
END;
/
What is causing this to happen? I'm trying to understand.

Thanks.
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points