我正在尝试设置此col但我收到错误:
FirstName + (CASE WHEN LEN(FirstName + LastName) > 0 THEN ' ' ELSE '') + LastName
答案 0 :(得分:2)
你应该用END关闭CASE,而且我认为以下值会更好:
FirstName + (CASE WHEN LEN(FirstName) > 0 AND LEN(LastName) > 0 THEN ' ' ELSE '' END) + LastName
答案 1 :(得分:1)
FirstName + (CASE WHEN LEN(FirstName + LastName) > 0 THEN ' ' ELSE '' end) + LastName
错过了结束