Hi Paul,
You Rocks !!!!!!!n Yes It is working as expected.
I would also like to know that if I need to learn Triggers and Stored 
Procedures then what document should I refer, I am am new for triggers and SP. 
Googling is random way I see. Would you refer any good books for this?
Corrected Trigger is as below:
SET TERM ^ ;CREATE TRIGGER MYTRIGGER FOR TABLE_NAME ACTIVE
BEFORE UPDATE POSITION 0
as
begin
if (new.col3 is distinct from old.col3)
then new.col5 = current_timestamp;
end^
SET TERM ; ^
 

Thanking You And With Best Regards.
Vishal

    On Wednesday, 9 August 2017 3:35 PM, "Paul Vinkenoog p...@vinkenoog.nl 
[firebird-support]" <firebird-support@yahoogroups.com> wrote:
 

     Vishal Tiwari vishuals...@yahoo.co.in [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
> <vishuals...@yahoo.co.in> 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

  #yiv8541066980 #yiv8541066980 -- #yiv8541066980ygrp-mkp {border:1px solid 
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv8541066980 
#yiv8541066980ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv8541066980 
#yiv8541066980ygrp-mkp #yiv8541066980hd 
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 
0;}#yiv8541066980 #yiv8541066980ygrp-mkp #yiv8541066980ads 
{margin-bottom:10px;}#yiv8541066980 #yiv8541066980ygrp-mkp .yiv8541066980ad 
{padding:0 0;}#yiv8541066980 #yiv8541066980ygrp-mkp .yiv8541066980ad p 
{margin:0;}#yiv8541066980 #yiv8541066980ygrp-mkp .yiv8541066980ad a 
{color:#0000ff;text-decoration:none;}#yiv8541066980 #yiv8541066980ygrp-sponsor 
#yiv8541066980ygrp-lc {font-family:Arial;}#yiv8541066980 
#yiv8541066980ygrp-sponsor #yiv8541066980ygrp-lc #yiv8541066980hd {margin:10px 
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv8541066980 
#yiv8541066980ygrp-sponsor #yiv8541066980ygrp-lc .yiv8541066980ad 
{margin-bottom:10px;padding:0 0;}#yiv8541066980 #yiv8541066980actions 
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv8541066980 
#yiv8541066980activity 
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv8541066980
 #yiv8541066980activity span {font-weight:700;}#yiv8541066980 
#yiv8541066980activity span:first-child 
{text-transform:uppercase;}#yiv8541066980 #yiv8541066980activity span a 
{color:#5085b6;text-decoration:none;}#yiv8541066980 #yiv8541066980activity span 
span {color:#ff7900;}#yiv8541066980 #yiv8541066980activity span 
.yiv8541066980underline {text-decoration:underline;}#yiv8541066980 
.yiv8541066980attach 
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 
0;width:400px;}#yiv8541066980 .yiv8541066980attach div a 
{text-decoration:none;}#yiv8541066980 .yiv8541066980attach img 
{border:none;padding-right:5px;}#yiv8541066980 .yiv8541066980attach label 
{display:block;margin-bottom:5px;}#yiv8541066980 .yiv8541066980attach label a 
{text-decoration:none;}#yiv8541066980 blockquote {margin:0 0 0 
4px;}#yiv8541066980 .yiv8541066980bold 
{font-family:Arial;font-size:13px;font-weight:700;}#yiv8541066980 
.yiv8541066980bold a {text-decoration:none;}#yiv8541066980 dd.yiv8541066980last 
p a {font-family:Verdana;font-weight:700;}#yiv8541066980 dd.yiv8541066980last p 
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv8541066980 
dd.yiv8541066980last p span.yiv8541066980yshortcuts 
{margin-right:0;}#yiv8541066980 div.yiv8541066980attach-table div div a 
{text-decoration:none;}#yiv8541066980 div.yiv8541066980attach-table 
{width:400px;}#yiv8541066980 div.yiv8541066980file-title a, #yiv8541066980 
div.yiv8541066980file-title a:active, #yiv8541066980 
div.yiv8541066980file-title a:hover, #yiv8541066980 div.yiv8541066980file-title 
a:visited {text-decoration:none;}#yiv8541066980 div.yiv8541066980photo-title a, 
#yiv8541066980 div.yiv8541066980photo-title a:active, #yiv8541066980 
div.yiv8541066980photo-title a:hover, #yiv8541066980 
div.yiv8541066980photo-title a:visited {text-decoration:none;}#yiv8541066980 
div#yiv8541066980ygrp-mlmsg #yiv8541066980ygrp-msg p a 
span.yiv8541066980yshortcuts 
{font-family:Verdana;font-size:10px;font-weight:normal;}#yiv8541066980 
.yiv8541066980green {color:#628c2a;}#yiv8541066980 .yiv8541066980MsoNormal 
{margin:0 0 0 0;}#yiv8541066980 o {font-size:0;}#yiv8541066980 
#yiv8541066980photos div {float:left;width:72px;}#yiv8541066980 
#yiv8541066980photos div div {border:1px solid 
#666666;min-height:62px;overflow:hidden;width:62px;}#yiv8541066980 
#yiv8541066980photos div label 
{color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv8541066980
 #yiv8541066980reco-category {font-size:77%;}#yiv8541066980 
#yiv8541066980reco-desc {font-size:77%;}#yiv8541066980 .yiv8541066980replbq 
{margin:4px;}#yiv8541066980 #yiv8541066980ygrp-actbar div a:first-child 
{margin-right:2px;padding-right:5px;}#yiv8541066980 #yiv8541066980ygrp-mlmsg 
{font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv8541066980 
#yiv8541066980ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv8541066980 
#yiv8541066980ygrp-mlmsg select, #yiv8541066980 input, #yiv8541066980 textarea 
{font:99% Arial, Helvetica, clean, sans-serif;}#yiv8541066980 
#yiv8541066980ygrp-mlmsg pre, #yiv8541066980 code {font:115% 
monospace;}#yiv8541066980 #yiv8541066980ygrp-mlmsg * 
{line-height:1.22em;}#yiv8541066980 #yiv8541066980ygrp-mlmsg #yiv8541066980logo 
{padding-bottom:10px;}#yiv8541066980 #yiv8541066980ygrp-msg p a 
{font-family:Verdana;}#yiv8541066980 #yiv8541066980ygrp-msg 
p#yiv8541066980attach-count span {color:#1E66AE;font-weight:700;}#yiv8541066980 
#yiv8541066980ygrp-reco #yiv8541066980reco-head 
{color:#ff7900;font-weight:700;}#yiv8541066980 #yiv8541066980ygrp-reco 
{margin-bottom:20px;padding:0px;}#yiv8541066980 #yiv8541066980ygrp-sponsor 
#yiv8541066980ov li a {font-size:130%;text-decoration:none;}#yiv8541066980 
#yiv8541066980ygrp-sponsor #yiv8541066980ov li 
{font-size:77%;list-style-type:square;padding:6px 0;}#yiv8541066980 
#yiv8541066980ygrp-sponsor #yiv8541066980ov ul {margin:0;padding:0 0 0 
8px;}#yiv8541066980 #yiv8541066980ygrp-text 
{font-family:Georgia;}#yiv8541066980 #yiv8541066980ygrp-text p {margin:0 0 1em 
0;}#yiv8541066980 #yiv8541066980ygrp-text tt {font-size:120%;}#yiv8541066980 
#yiv8541066980ygrp-vital ul li:last-child {border-right:none 
!important;}#yiv8541066980 

   
  • [firebird-support... Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
    • [firebird-su... Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
      • Re: [fir... Paul Vinkenoog p...@vinkenoog.nl [firebird-support]
        • Re: ... Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
          • ... Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
            • ... Paul Vinkenoog p...@vinkenoog.nl [firebird-support]
              • ... Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
                • ... Paul Vinkenoog p...@vinkenoog.nl [firebird-support]

Reply via email to