Subject | Re: Trigger. Before and after |
---|---|
Author | Michael Vilhelmsen |
Post date | 2005-04-06T13:52:34Z |
> No, always use "old" and "new" ...OK - Now I'm confused.
>
> What I was meaning to say was that an assignment
> (new.column = newvalue) can only be done in a
> BEFORE trigger.
>
I have a trigger defined as BEFORE UPDATE which does this:
if (Old.SomeDate<>New.SomeDate) then
New.MyDateField = New.SomeDate
Sometimes it fires. Sometimes not.
If I change the trigger to a AFTER UPDATE trigger it works every time.
Regards
Michael