SET TERM ^ ;

CREATE or alter trigger ttbemail_b02i for tbemail
active before insert position 2
AS
BEGIN   
    IF(NEW.DE IS NULL) THEN
    BEGIN
        NEW.DE = FN_PARAMETRO('TBEMAIL.EMAIL');
    END
END
^

SET TERM ; ^

UPDATE TBPARAMETRO SET 
    DESCRICAO = 'EMAIL DE EXIBICAO PARA RESPOSTAS'
WHERE (TABELA = 'TBEMAIL') AND
      (CODIGO = 'EMAIL');