0

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
1

1 Answer 1

3

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.