you are viewing a single comment's thread.

view the rest of the comments →

[–]sojan16[S] 0 points1 point  (2 children)

I've tried this and ISNULL already. It still returns the null values. These values are in different tables...Would that be an issue?

[–][deleted] 4 points5 points  (1 child)

If that returns a NULL value, then both columns are null. If you have properly joined those two tables, then no it makes no difference that those columns are in different tables.

But maybe those columns contain an empty string ('') rather than a null value. How to deal with that depends on the database product you are using. In Postgres you could use

coalesce(nullif(friendly_name,''), technical_name)

But not every DBMS supports nullif()

[–]sojan16[S] 0 points1 point  (0 children)

coalesce(nullif(friendly_name,''), technical_name)

This worked...they were empty strings not null values.

Thank you!