IF EXISTS (SELECT * FROM SYS.TRIGGERS WHERE NAME = 'TRG_EST_PROD_PRECO_ALT_CPL_INCLUI_PENDENCIA')
begin
	DROP TRIGGER [dbo].[TRG_EST_PROD_PRECO_ALT_CPL_INCLUI_PENDENCIA]
end
go
CREATE TRIGGER [dbo].[TRG_EST_PROD_PRECO_ALT_CPL_INCLUI_PENDENCIA] ON [dbo].[EST_PROD_PRECO_ALT_CPL] FOR INSERT AS
INSERT INTO EST_PROD_PRECO_ALT_CPL_PENDENTE_APLICACAO_PRECO (
		CD_EMP,
		CD_ALT_PRECO,
		CD_PROD,
		DT_CAD)
	SELECT 
		CD_EMP,
		CD_ALT_PRECO,
		CD_PROD,
		GETDATE()
    FROM 
		INSERTED p;