Como mostrar um valor junto com uma exception

Firebird

15/02/2006

Galera eu preciso monstrar a quantidade junto com a exception como posso fazer isso?
tenho uma TRIGGER assim:


CREATE TRIGGER ITENS_ENTRADA_BU0 FOR ITENS_ENTRADA
ACTIVE BEFORE UPDATE POSITION 0
AS
declare variable qtd numeric(15,5);
begin 
if (NEW.qtd < OLD.qtd) then BEGIN
exception  erros_nf_a+qtd;
END

end


thanks


Marcos Fernando

Marcos Fernando

Curtidas 0

Respostas

Marcos Fernando

Marcos Fernando

15/02/2006

Resposta assim:

CREATE TRIGGER ITENS_ENTRADA_BU0 FOR ITENS_ENTRADA
ACTIVE BEFORE UPDATE POSITION 0
AS
declare variable qtd numeric(15,5);
begin
if (NEW.qtd < OLD.qtd) then BEGIN
exception erros_nf_a||CAST((qtd) AS VARCHAR(20))
END

end

thanks


GOSTEI 0
Marcos Fernando

Marcos Fernando

15/02/2006

Resposta assim:

CREATE TRIGGER ITENS_ENTRADA_BU0 FOR ITENS_ENTRADA 
ACTIVE BEFORE UPDATE POSITION 0 
AS 
declare variable qtd numeric(15,5); 
begin 
if (NEW.qtd < OLD.qtd) then BEGIN 
exception  erros_nf_a||CAST((qtd) AS VARCHAR(20))
END 

end

thanks


GOSTEI 0
POSTAR