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: DA Morgan <damorgan_at_x.washington.edu>
Date: Mon, 11 Apr 2005 16:59:26 -0700
Message-ID: <1113263745.501368@yasure>


Bill Bell wrote:

> 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

Your trigger is a non-starter. The procedure header is not in the package header. What you call is package_name.procedure_name.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Mon Apr 11 2005 - 18:59:26 CDT

Original text of this message

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