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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Delete Trigger - Constrain Delete to 1 Row

Re: Oracle Delete Trigger - Constrain Delete to 1 Row

From: Bill Bell <billb_at_deletethis.ti.com>
Date: Mon, 11 Apr 2005 17:03:25 -0500
Message-ID: <d3es7d$96h$1@home.itg.ti.com>


Ok, I am still working to understand this. I created a package

PACKAGE APEX_VAR
IS

   recCnt PLS_INTEGER;
END; and a body with:

PACKAGE BODY APEX_VAR
IS

   PROCEDURE INC_REC_CNT
   IS
   BEGIN
     recCnt := recCnt + 1;
   END;    FUNCTION RTN_REC_CNT
     RETURN PLS_INTEGER
   IS
   BEGIN
     RETURN recCnt;
   END;
END; I am still not clear on how to call this from the trigger. I don't know how to initialize the counter. Any help would be very much appreciated.

Mike Cretan wrote:
> "Frank van Bortel" <fvanbortel_at_netscape.net> wrote in message
> news:d3edji$8aj$1_at_news6.zwoll1.ov.home.nl...
>

>>Semiconductor Division of Texas Instruments?
>>
>>I would think some thing like:
>>- a row level trigger, adding 1 to a packaged variable
>>- a statement trigger, reading the packaged variable, if >1, err off.
>>
>>-- 
>>Regards,
>>Frank van Bortel

>
>
> Nice one.
>
> But how about initialising the package variable in a pre-statement trigger,
> then raising the exception within the row level trigger if > 1
>
> Mike Cretan.
>
>
>

   Bill Bell Received on Mon Apr 11 2005 - 17:03:25 CDT

Original text of this message

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