CREATE FUNCTION dbo.IsHallTypeInList(@AHallType INT, @AHallTypeList VARCHAR (50))
--Created by AV 2006 0117.
--This function is used in the Hall Schedule program

RETURNS BIT AS
BEGIN
  DECLARE @Return BIT
  SET @Return = 1

  IF @AHallTypeList <> ''
  BEGIN
    SET @AHallTypeList = ',' + @AHallTypeList + ','

    IF CHARINDEX(','+CONVERT(VARCHAR(3),@AHallType)+',',@AHallTypeList) = 0
      SET @Return = 0
  END


  RETURN @Return
END

