Subject | Re: [firebird-support] Trigger - What´s |
---|---|
Author | Aage Johansen |
Post date | 2005-09-05T21:28:10Z |
Aage Johansen wrote:
> Patrick Antonioli wrote:', ';
> > I Keep getting this error:
> > Unsuccessful execution caused by a system error that precludes
> > successful execution of subsequent statements.
> > Dynamic SQL Error.
> > expression evaluation not supported.
> > Create trigger ..............................
> > AS
> >
> > declare variable changes varchar(1000) ;
> >
> > begin
> >
> > changes = '';
> >
> > IF (old."id" <> new."id") THEN
> > begin
> > changes = :changes + 'ID: ' || old."id" || ' \ ' || new."id" || ', ';
> > end
> >
> > IF (old."nome" <> new."nome") THEN
> > begin
> > changes = :changes + 'NOME: ' || old."nome" || ' \ ' || new."nome" ||
> > endOn 2nd thought - make that "null" ...
> >
>
> Apart from the concatenation problem, ...
> I don't think CHANGES will ever be "not null".
>
>
> > if (:changes is not null) then
> > begin
> > INSERT into "HistoryTest"
> > values
> > (old."id", old."nome", 'now', 'U', :changes);
> > end
> > end
>
>
> --
> Aage J.