Subject Re: [firebird-support] Re: On Updating One Column Value, Update Time Stamp in Another Column
Author Paul Vinkenoog
Vishal Tiwari vishualsoft@... [firebird-support] schreef op
09-08-2017 11:58:
> I have put table name as Table_Name, which is actual table name.
>
> On Wednesday, 9 August 2017 3:27 PM, Vishal Tiwari
> <vishualsoft@...> wrote:
>
> Hi Paul,
>
> I am getting below error while executing the trigger you shared. May
> be because of new FB version? I am executing using FlamRobin tool.
>
> Please see error below:
>
> *** IBPP::SQLException ***
> Context: Statement::Prepare( create trigger before update on
> Table_Name
> as
> begin
> if (new.col3 is distinct from old.col3)
> then new.col5 = current_timestamp )
> Message: isc_dsql_prepare failed
>
> SQL Message : -104
> can't format message 13:896 -- message file
> C:\Windows\system32\firebird.msg not found
>
> Engine Code : 335544569
> Engine Message :
> Dynamic SQL Error
> SQL error code = -104
> Token unknown - line 1, column 23
> update

My fault! If forgot the trigger name. It should be:

create trigger MyTrigger before update on Table_Name ...

Instead of MyTrigger, you choose a more meaningful name of course.


Cheers,
Paul Vinkenoog