Home Forums SQL Server 2005 T-SQL (SS2K5) n.value = isNull(@Value,n.Value) Different Record Counts Returned. RE: n.value = isNull(@Value,n.Value) Different Record Counts Returned.

  • I actually cleaned up the query to make it more generic it should have been just like the other.

    AND n.STAFFID = isnull(@STAFFID, n.STAFFID)

    The main question becomes why the IsNull function doesn't show the same results as a longer statement that tests for the same thing.