Skip to content
Advertisement

Why is my case statement not returning the value in my “else” clause?

I have this section of code and my ELSE is not working. It should return ‘UNKNOWN’ but I am still seeing NULLs in my results. What is going on?

Advertisement

Answer

Perhaps you want coalesce():

This returns the first non-NULL value. As formulated with a constant as the last argument, it can never return NULL.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement