Table1
Value String
1 Cleo, Smith
Value String
1 Cleo, Smith
Select
Value ,
Substring(FullName, 1,Charindex(',', FullName)-1) as Name,
Substring(FullName, Charindex(',', FullName)+1, LEN(FullName)) as Surname
from Table1
Substring(FullName, Charindex(',', FullName)+1, LEN(FullName)) as Surname
from Table1
Output
Value Name Surname
1 Cleo Smith
Value Name Surname
1 Cleo Smith
No comments:
Post a Comment