I am trying to set this col but I get an error:
FirstName + (CASE WHEN LEN(FirstName + LastName) > 0 THEN ' ' ELSE '') + LastName
I am trying to set this col but I get an error:
FirstName + (CASE WHEN LEN(FirstName + LastName) > 0 THEN ' ' ELSE '') + LastName
FirstName + (CASE WHEN LEN(FirstName + LastName) > 0 THEN ' ' ELSE '' end) + LastName
missing the end
You should close CASE with END and also, to my opinion, the following value will be better:
FirstName + (CASE WHEN LEN(FirstName) > 0 AND LEN(LastName) > 0 THEN ' ' ELSE '' END) + LastName