IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[TRG_EST_NFE_DEST_ITEM_CONS_PESSOAL_VALIDADA]'))
	DROP TRIGGER [dbo].[TRG_EST_NFE_DEST_ITEM_CONS_PESSOAL_VALIDADA]
GO

CREATE TRIGGER [dbo].[TRG_EST_NFE_DEST_ITEM_CONS_PESSOAL_VALIDADA] ON [dbo].[EST_NFE_DEST_ITEM_CONS_PESSOAL_VALIDADA] FOR INSERT AS

--Excluindo pendencia de valida da carta de correcao.
DELETE 
	pend 
FROM 
	INSERTED I inner join EST_NFE_DEST_ITEM_CONS_PESSOAL_PEND pend ON
    I.CD_CTR_DEST_ITEM_CONS_PESSOAL      = pend.CD_CTR_DEST_ITEM_CONS_PESSOAL     