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

  • Point taken, Drew - I should have phrased it better and said "your code would be clearer if" rather than "you need to". You're right that there's no syntactical requirement to do it that way, and that overlapping conditions are allowed. However, the overlapping conditions in the original post meant that the second condition would never have been evaluated be evaluated as True.

    Your suggestion of allowing a NULL to be returned isn't an option here since the very reason for this thread is that NULLs are not wanted. Coding an ELSE NULL is indeed pointless, which is why I didn't suggest it.

    Perfectly happy with the way you rewrote my code, by the way!

    John