IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[P_EST_PED_ELTR_FORN_CTR_ENV_PG_FORN_INTEGRACAO_ARQ_PENDENTE_ATUALIZA]') 
					AND type in (N'P', N'PC'))
BEGIN
	DROP PROCEDURE [DBO].[P_EST_PED_ELTR_FORN_CTR_ENV_PG_FORN_INTEGRACAO_ARQ_PENDENTE_ATUALIZA]
END
GO
CREATE PROCEDURE  P_EST_PED_ELTR_FORN_CTR_ENV_PG_FORN_INTEGRACAO_ARQ_PENDENTE_ATUALIZA (@arqXmlPedido varchar(255), 
																	   @fileXmlPedido varbinary(max),
																	   @cdCtrEnv int)

as
SET NOCOUNT ON;
SET TRANSACTION ISOLATION LEVEL SNAPSHOT;
    UPDATE 
	   EST_PED_ELTR_FORN_CTR_ENV_PG_FORN_INTEGRACAO_ARQ_PENDENTE
    SET 
	   ARQ_XML_PEDIDO	= @arqXmlPedido,
	   FILE_XML_PEDIDO = @fileXmlPedido
    WHERE 
	   CD_CTR_ENV		= @cdCtrEnv;