Thanks so much Anita.I'm trying to substring only when there's a space. However, I got a case function error for the expression below. Can you help?Thanks again!Case(When(@fullName LIKE ' ', Substring(@fullName,0,Charindex(@fullName, " ")), Else(@fullName)))