Subject Re: [firebird-support] Timestamp - trigger
Author Ann W. Harrison
Dion wrote:

>
> I get an “Unknow token – end” here.

>
>
> CREATE TRIGGER SMSQ_RecDateIns FOR SMSQ
> ACTIVE AFTER INSERT POSITION 0
> AS
> begin
> /* Trigger text */
>
> New.receivedate = cast("NOW" as timestamp)
>
> end

The first problem is that you need a semicolon
after the assignment

The second problem is that in Dialect 3, double
quotes indicate that the string is a delimited
identifier - the name of a table or field. Use
single quotes.

New.receivedate = cast('NOW' as timestamp);

Regards,


Ann