Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How the get a maximum of a value in the affected rows inside a trigger?
Hi,
create a package to hold the maximum value like
create package max_val is
the_max number;
end;
create a before statement-level trigger to zero it:
create trigger set_zero before insert or update on tab
max_val.the_max := 0;
end;
in your own trigger compare the values to max_val.the_max and adjust it
then in an after statement-level trigger you can examin the maximum value
hope this helps,
Gert
-- At Home: gem_at_wirehub.nl At Work: gert.rijs_at_corp.ah.nl Poon Chak Yau <cypoon_at_hknet.com> wrote in article <3325634f.3218048_at_bull.hkstar.net>...Received on Tue Mar 11 1997 - 00:00:00 CST
> Hello,
> How the get a maximum of a value in the affected rows inside a
> for-each-row trigger?
>
> Regards,
>
> Poon Chak Yau.
>
![]() |
![]() |