Subject | Re: [firebird-support] Doubt with trigger before insert |
---|---|
Author | André Knappstein |
Post date | 2013-01-23T17:59:03Z |
> ...assuming that "new.registro_id" is indeed a new ID (not already
> where nfi.registro_id=new.registro_id
existing in the NFI table), I would expect to get an empty resultset
like you actually do.
The Trigger is "BEFORE" insert and is operating on the table
"Notasfiscaisitens" (NFI) which means that the "new.registro_ID"
is not yet inserted into that relation.
Therefore, no record matches the WHERE condition in your case and you
get NULLs.
best regards,
André