Subject Re: [firebird-support] Expression evaluation not supported
Author Martijn Tonies
Hi Ed,

> SET TERM ^;
>
> CREATE TRIGGER TRIG_SOMETABLE_BU FOR SOMETABLE BEFORE UPDATE
> AS
> declare variable Notation varchar(100);
> BEGIN
> Notation = '';
> if (OLD.FIELDNAME <> NEW.FIELDNAME) then
> Notation = 'Changed name from "' + Old.FIELDNAME + '" to "'
> + New.FIELDNAME + '"';
> END ^
> ...
>
> I get an error:
>
> Expression evaluation not supported.
>
> If I remove the concantiantion of strings then it seems to work fine.

Take a look at the docs, or the SQL standard, for that matter -
strings are concatenated via the double pipe: || (two pipe symbols):

Notation = 'Changed ... ' || OLD.Fieldname



With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird & MS SQL Server.
Upscene Productions
http://www.upscene.com