IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[_actualizarEjecutaDevolucion]') AND type in (N'P', N'PC'))
BEGIN
execute('CREATE PROCEDURE [dbo].[_actualizarEjecutaDevolucion]
		-- Add the parameters for the stored procedure here
			@p_idSubtipoDocumento AS int,
			@p_ejecutaDevolucion AS bit
		AS
		BEGIN
		
			update view_doc_documento_alquiler 
			set ejecutaDevolucion = @p_ejecutaDevolucion
			where doc_documento_alquiler_id_subtipoDocumento = @p_idSubtipoDocumento

		END')

END
