[firebase-br] RES: TRIGGUER - ERRO

Moacir Antonio Kuhn moacir em softin.com.br
Ter Maio 3 08:45:21 -03 2016


DECLARE CAMPO1 .....
AS
begin
  select MON$REMOTE_ADDRESS from mon$attachments where mon$attachment_id =
current_connection INTO :CAMPO1;
 if (inserting) then
    begin
        INSERT INTO tb_audita (NOME_IP, COD_REGISTRO) values  (CAMPO1,
new.codigo_aluno);
    end
end

Quaisquer dúvida/questionamento estou a disposição.
Atenciosamente,



Moacir Antônio Kuhn
Analista
(47) 3437-3312 | www.softin.com.br
Rua Iririú, 847 - Saguaçu - 89221-515 









Universo colaborativo de soluções para serviços.










-----Mensagem original-----
De: lista [mailto:lista-bounces em firebase.com.br] Em nome de Cezar Moniz
Enviada em: terça-feira, 3 de maio de 2016 08:39
Para: FireBase
Assunto: [firebase-br] TRIGGUER - ERRO

Prezados.

Não estou conseguindo identificar o erro no ponto e vírgula nesta
trigguer...
Estou querendo gravar o nome da conecção remota em um campo da tabela,
quando for insert ou update, pela triguer.

Alguma orientação?

AS
begin
  select MON$REMOTE_ADDRESS from mon$attachments where mon$attachment_id =
current_connection; if (inserting) then
    begin
        INSERT INTO tb_audita (NOME_IP, COD_REGISTRO) values
(MON$REMOTE_ADDRESS), new.codigo_aluno);
    end
end

Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 8, column 36.
*;.*

Obrigado ao grupo.
--
[]'s
______________________________________________
FireBase-BR (www.firebase.com.br) - Hospedado em www.locador.com.br Para
saber como gerenciar/excluir seu cadastro na lista, use:
http://www.firebase.com.br/fb/artigo.php?id=1107
Para consultar mensagens antigas:
http://www.firebase.com.br/pesquisa_lista.html





Mais detalhes sobre a lista de discussão lista