Thread: Trigger problem 2

Trigger problem 2

From
Jamie Deppeler
Date:
Hi

Finally getting this trigger ro work have one last problem, im trying to
use Trigger variables

sample code

     UPDATE wip.resource
     set "name" = datarecord.borname
     where wip.resource."primary" = OLD."primary";


get the following error

Error: record "old" is not yet assigned

would be greatful for any help thx




Attachment

Re: Trigger problem 2

From
Richard Huxton
Date:
Jamie Deppeler wrote:
>
>     UPDATE wip.resource
>     set "name" = datarecord.borname
>     where wip.resource."primary" = OLD."primary";
>
>
> get the following error
>
> Error: record "old" is not yet assigned

If called from an INSERT then OLD is undefined, since there is no old
version of the row.

--
   Richard Huxton
   Archonet Ltd