SQL Coalesce with empty string
sql, sql-server
Solution
Use a `CASE` expression or `NULLIF`:
SELECT COALESCE(NULLIF(Other,''),Industry) Ind FROM registration
Problem
I have the following: ``` Select Coalesce(Other,Industry) Ind from registration ``` The thing is that `Other` can be an empty string or `NULL`. How do I get `coalesce` to work such that if `Other` is an empty string, `Coalesce` still returns `Industry`?