Subject | Re: [firebird-support] Trigger - What´s Wrong??? it looks fine for me... |
---|---|
Author | Aage Johansen |
Post date | 2005-09-05T20:01:14Z |
Patrick Antonioli wrote:
I don't think CHANGES will ever be "not null".
Aage J.
> I Keep getting this error:Apart from the concatenation problem, ...
> 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" || ', ';
> end
>
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.