erro criando trigger

Firebird

30/01/2008

[b:5538a8eda5]estou tentando criar esta trigger na tabela pedidos.[/b:5538a8eda5]


CREATE trigger pedido_au0 for pedido
active after update position 0
AS
begin
if (new.STATUS = ´I´) then
update ITEM_PEDIDO set STATUS = ´I´
where ID_PEDIDO = old.ID_PEDIDO;
end

[b:5538a8eda5]e me da o seguinte erro qnd tento compilar:[/b:5538a8eda5]

This operation is not defined for system tables.
unsuccessful metadata update.
DEFINE TRIGGER failed.
attempt to store duplicate value (visible to active transactions) in unique index ´RDB$INDEX_8´.

[b:5538a8eda5]Alguém sabe o q pode estar acontecendo??[/b:5538a8eda5]


Ricklorente

Ricklorente

Curtidas 0

Respostas

Sremulador

Sremulador

30/01/2008

amigo, me parece que esta tg já existe


GOSTEI 0
POSTAR