|Subject||Re: [firebird-support] Doubt with trigger before insert|
> ...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