CONCAT
function ignores NULLs:
SELECT CONCAT(LEFT(LastName, 1), ',' , LEFT(FirstName, 1), ' ' + LEFT(MiddleName, 1)) theNameWithInitials FROM myTable
If you use CONCAT, you will not need to worry about whether LEFT(X) is null or not.
CONCAT
function ignores NULLs:
SELECT CONCAT(LEFT(LastName, 1), ',' , LEFT(FirstName, 1), ' ' + LEFT(MiddleName, 1)) theNameWithInitials FROM myTable
If you use CONCAT, you will not need to worry about whether LEFT(X) is null or not.