I had not put the END of the CASE

Best Regards
=========
|| ISMAEL ||
=========
  ----- Original Message ----- 
  From: Ismael L. Donis Garcia 
  To: Firebird Support 
  Sent: Monday, September 03, 2012 4:08 PM
  Subject: [firebird-support] I need help to create trigger in Flamerobin and 
Firebird 2.5.1



    
  SET TERM ^ ;
  CREATE TRIGGER AFCONFI_AU FOR AFCONFI ACTIVE
  AFTER UPDATE POSITION 0
  AS
  BEGIN
  /* Trigger para registrar el control de actividades */
  if (old.fechap <> new.fechap) then
  begin
  if (old.fechap < new.fechap) then
  execute procedure pi_afact(new.idac, 'Realizó el cierre del período de 
contable correspondiente al mes de ' 
  || case when (extract(month from old.fechap) = 1) then 'Enero/' when 
(extract(month from old.fechap) = 2) then 'Febrero/'
  when (extract(month from old.fechap) = 3) then 'Marzo/' when (extract(month 
from old.fechap) = 4) then 'Abril/'
  when (extract(month from old.fechap) = 5) then 'Mayo/' when (extract(month 
from old.fechap) = 6) then 'Junio/' 
  when (extract(month from old.fechap) = 7) then 'Julio/' when (extract(month 
from old.fechap) = 8) then 'Agosto/' 
  when (extract(month from old.fechap) = 9) then 'Septiembre/' when 
(extract(month from old.fechap) = 10) then 'Octubre/' 
  when (extract(month from old.fechap) = 11) then 'Noviembre/' else 
'Diciembre/' || extract(year from old.fechap) || ' de la entidad: ' || 
new.entidad);
  else
  exception e_act;
  end
  END^
  SET TERM ; ^

  Message: isc_dsql_prepare failed

  SQL Message : -104
  Invalid token

  Engine Code : 335544569
  Engine Message :
  Dynamic SQL Error
  SQL error code = -104
  Token unknown - line 16, column 160
  )

  Thanks all 
  =========
  || ISMAEL ||
  =========



[Non-text portions of this message have been removed]

Reply via email to