Home Forums SQL Server 2008 T-SQL (SS2K8) Getting NULL output against the column : completion_status RE: Getting NULL output against the column : completion_status

  • You need to handle all eventualities once and once only in your case expression - something like this:

    ...

    CASE WHEN Interval < 1 THEN 'X'

    WHEN Interval >= 1 AND Interval < 7 THEN 'Y'

    WHEN Interval >= 7 THEN 'Z'

    ELSE 'Warning - Interval falls outside expected ranges'

    END

    ...

    John