[firebase-br] Erro em Trigger
Tiago de Assis Pimenta
tiagopimenta em gmail.com
Dom Nov 9 01:55:19 -03 2008
Galera estou com a seguinte trigger:
CREATE OR ALTER trigger trg_guias_mesref for guias
active before insert or update position 0
as
declare variable mesref char;
begin
select
max(mesref)
from
flagfechamento
into :mesref;
begin
if (new.mesref < :mesref) then
exception exc_mesref_abaixo;
end
end
A exception esta assim:
CREATE EXCEPTION EXC_MESREF_ABAIXO 'O mês de referência está abaixo do
permitido';
E esta dando o seguinte erro:
Error Message:
----------------------------------------
Arithmetic overflow or division by zero has occurred.
arithmetic exception, numeric overflow, or string truncation.
string right truncation.
At trigger 'TRG_GUIAS_MESREF'.
Alguem sabe o porque ??
Se eu tirar a variável e colocar direto ali if (new.mesref < 200810 ) por
exemplo, ele dá certo. Mas se deixar com o :mesref, da o erro acima.
Mais detalhes sobre a lista de discussão lista