Subject | Re: Setting field values within a trigger |
---|---|
Author | Dan Statham |
Post date | 2003-06-06T16:41Z |
Good Morning!
Well. There it is. I am doing this in the AFTER trigger. Guess
I'll have to move it to the BEFORE trigger.
Thanks...Dan'l
Well. There it is. I am doing this in the AFTER trigger. Guess
I'll have to move it to the BEFORE trigger.
Thanks...Dan'l
--- In ib-support@yahoogroups.com, Paul Vinkenoog <paul@v...> wrote:
> Hi Dan,
>
> > I am trying to set some fields in a table based on variable
results
> > from within the tables insert trigger.
> >
> > I am looking up and or calculating some variables. Then, I am
using
> > "New.TotQtyBefore=:Total_Before" (and other fields the same way)
but
> > the field is comming up null. I have a "if (new.TotQtyBefore is
> > null) then new.TotQtyBefore =0" but it did not help.
>
> Are you sure you do this in a BEFORE trigger?
>
> If you do it in an AFTER trigger, no error is generated but any
> assignment to New.whatever is silently discarded.
>
> Greetings,
> Paul Vinkenoog