IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[_EdicionItemDocumento]') AND type in (N'P', N'PC'))
BEGIN
execute('
	CREATE PROCEDURE [dbo].[_EdicionItemDocumento]
		-- Add the parameters for the stored procedure here
		@p_id_itemDocumento AS int,
		@p_id_usuario AS int
	AS
	BEGIN
		-- SET NOCOUNT ON added to prevent extra result sets from
		-- interfering with SELECT statements.
		SET NOCOUNT ON;

		-- Insert statements for procedure here

		declare @cadena as varchar(100)
		select @cadena = case when cantidadEjecutado > 0 
					then ''Cantidad ejecutada tiene un valor mayor de cero'' 
					else (case when cantidadEjecutado < 0 then ''Cantidad ejecutada tiene un valor menor de cero'' else '''' end)
				end 
		from doc_itemDocumento
		where id = @p_id_itemDocumento
	
		--String que se muestra en la pantalla itemDocumento, !SIEMPRE DEJAR ESTE SELECT @cadena DE ÚLTIMASˇ
		select @cadena

	END
')

END