User16752245772
Databricks Employee
Databricks Employee

Hi @Steve Helms​ ,

There is drawback in SQL Concatenate function, as a workaround you can use COALESCE , COALESCE converts null values with empty string by wrapping in it .

Like this :

----

SELECT
substr(user.first, 0, 1),
user.first,
user.last,
CONCAT(COALESCE(substr(user.first,0,1),'')," ",COALESCE(`last`,'')) as abbr_name
FROM
user

-----

image

View solution in original post