IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[TRG_PDV_VD_FECHA_MOV_INTEGRACAO_ENVIO_PENDENTE_INCLUI_PENDENCIA]'))
DROP TRIGGER [dbo].[TRG_PDV_VD_FECHA_MOV_INTEGRACAO_ENVIO_PENDENTE_INCLUI_PENDENCIA]
GO
GO
GO
-------------------------------------INSERO EM PDV_VD--------------------------------------
CREATE TRIGGER [dbo].[TRG_PDV_VD_FECHA_MOV_INTEGRACAO_ENVIO_PENDENTE_INCLUI_PENDENCIA] ON [dbo].[PDV_VD_FECHA_MOV] FOR INSERT AS
INSERT INTO PDV_VD_FECHA_MOV_INTEGRACAO_ENVIO_PENDENTE (
	CD_EMP, 
	CD_FILIAL, 
	DT_MOV,
	DT_CAD)
    SELECT 
		DISTINCT CD_EMP, 
		CD_FILIAL, 
		DT_MOV,
		GETDATE()
    FROM 
		INSERTED