• So... you always want null results, but if @StatusId is null, return all rows? If so, I wonder how performance here would compare:

    DECLARE @maxStatus int, @minStatus int

    SELECT @maxStatus=9999999, @minStatus=-9999999

    IF @StatusId IS NOT NULL SELECT @maxStatus=@StatusId, @minStatus=@StatusId

    SELECT * FROM Employees

    WHERE StatusId BETWEEN @minStatus AND @maxStatus

    UNION

    SELECT * FROM Employees

    WHERE StatusId IS NULL

    :rolleyes: