Beginner with SQL and trying to improve this using ISNULL instead of the longer statement?
CASE WHEN c.FirstName IS NULL THEN '' ELSE c.FirstName END
Beginner with SQL and trying to improve this using ISNULL instead of the longer statement?
CASE WHEN c.FirstName IS NULL THEN '' ELSE c.FirstName END
You can simply replace the whole statement with ISNULL(c.FirstName, '') as per the docs on the ISNULL() function.
The first parameter is the value being checked for null, and the second parameter is the replacement value to return when the first parameter is null.