IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[CP_AppEve_InscExcepProd]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
BEGIN
    DROP PROCEDURE [dbo].[CP_AppEve_InscExcepProd] 
END
GO

CREATE PROCEDURE [dbo].[CP_AppEve_InscExcepProd] (@pId_Evento SMALLINT, @pId_Controlador SMALLINT)
AS
BEGIN

SELECT p.Id_Producto, p.Descripcion_Detallada AS Descripcion 
	FROM Prod_Listas_Precios_Items l
	left join Productos p on l.Id_Producto=p.Id_Producto
	WHERE Id_Lista_Precio=@pId_Evento
	AND p.Id_Familia NOT IN (dbo.CF_xParam('Flias_Habitaciones'), 
	dbo.CF_xParam('Flias_Mesas'),
	dbo.CF_xParam('Flias_Acred_Inst'))

END

