IF EXISTS( SELECT * FROM SYS.OBJECTS 
			WHERE NAME ='TRG_RC_CONC_PDV_VD_TEF_PGTO_CONCILIADO_CPL_INCLUI_PENDENCIA'AND TYPE = 'TR')
BEGIN
	DROP TRIGGER dbo.TRG_RC_CONC_PDV_VD_TEF_PGTO_CONCILIADO_CPL_INCLUI_PENDENCIA 
END
GO
CREATE TRIGGER [dbo].[TRG_RC_CONC_PDV_VD_TEF_PGTO_CONCILIADO_CPL_INCLUI_PENDENCIA] ON [dbo].[RC_CONC_PDV_VD_TEF_PGTO_CONCILIADO_AGRUPAMENTO_CPL] FOR DELETE AS
INSERT INTO RC_CONC_PDV_VD_TEF_PGTO_CONCILIADO_CPL_PENDENCIA (CD_CTR_LOTE, CD_EMP, CD_FILIAL, CD_VD, CD_CTR, DT_CAD)
	SELECT CD_CTR_LOTE, CD_EMP, CD_FILIAL, CD_VD, CD_CTR, GETDATE()
	FROM DELETED c
	