IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[a_sel_recordatoriosXfiltro]') AND type in (N'P', N'PC'))
BEGIN
DROP PROCEDURE [dbo].[a_sel_recordatoriosXfiltro]
end
GO
CREATE PROCEDURE [dbo].[a_sel_recordatoriosXfiltro]
@p_filtro as varchar(max)
AS BEGIN
declare @usuario varchar(100)
exec ('select * from doc_documentoComentario where 1=1 and active = 1 and id in (' +@p_filtro+ ') or id_documentocomentario in (' +@p_filtro+ ') ')
end 