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

Home -> Community -> Usenet -> c.d.o.server -> Re: Trigger Problems

Re: Trigger Problems

From: <krishnanand_at_hotmail.com>
Date: 1997/10/24
Message-ID: <877673804.15567@dejanews.com>#1/1

In article <01bcdf5c$798cff00$25c6b7c7_at_mysite>,   "Sean Read" <sread_at_ix.netcom.com> wrote:
>
> I am having trouble creating the following UPDATE triggers:
>
> /* Trigger code */
> CREATE TRIGGER Trig_BIUD_geog1
> BEFORE INSERT OR UPDATE OR DELETE ON geog FOR EACH ROW
> DECLARE RecordCount NUMBER;
> BEGIN
>
> /* CASCADE UPDATES TO 'subgeog' */
> IF UPDATING AND :old.subareatyp != :new.areatype OR :old.substfips !=
> :new.stfips OR :old.subarea != :new.area THEN
> UPDATE subgeog
> SET subgeog.subareatyp = :new.areatype , subgeog.substfips = :new.stfips ,
> subgeog.subarea = :new.area
> WHERE subgeog.subareatyp = :old.areatype AND subgeog.substfips =
> :old.stfips AND subgeog.subarea = :old.area;
> END IF;
>
> /* CASCADE UPDATES TO 'subgeog' */
> IF UPDATING AND :old.areatype != :new.areatype OR :old.stfips !=
> :new.stfips OR :old.area != :new.area THEN
> UPDATE subgeog
> SET subgeog.areatype = :new.areatype , subgeog.stfips = :new.stfips ,
> subgeog.area = :new.area
> WHERE subgeog.areatype = :old.areatype AND subgeog.stfips = :old.stfips AND
> subgeog.area = :old.area;
> END IF;
> END;
>
> I am having a problem applying the first UPDATE trigger. It gives the
> following error:
>
> MGR-00072: Warning: TRIGGER TRIG_BIUD_GEOG1 created with compilation
> errors.
>
> I executed the command SHOW ERRORS and received the following message:
>
> 5/17 PLS-00049: bad bind variable 'OLD.SUBAREATYP'
> 5/53 PLS-00049: bad bind variable 'OLD.SUBSTFIPS'
> 5/86 PLS-00049: bad bind variable 'OLD.SUBAREA'
>
> What does this mean and what can I do to fix this problem?

Have U tried REFERENCING CLAUSE in trigger creation.

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Fri Oct 24 1997 - 00:00:00 CDT

Original text of this message

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