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
Paul White
  • 94,921
  • 30
  • 437
  • 687
Jude
  • 1

1 Answers1

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.

J.D.
  • 40,776
  • 12
  • 62
  • 141