set ANSI_NULLS OFF
set QUOTED_IDENTIFIER OFF
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[a_sel_cat_resumenProducto_m]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[a_sel_cat_resumenProducto_m]
GO
CREATE PROCEDURE [dbo].[a_sel_cat_resumenProducto_m]
@p_id_catalogo as  int,
@p_eid as varchar(50)=''
AS
BEGIN
select 'Total Producido' as descripcion,convert(varchar,case when sum(cantidad)is null then 0 else sum(cantidad) end) as dato
from dis_evento_catalogo
where id_catalogo=@p_id_catalogo and active=1 and eid like @p_eid+'%'

END

