Hi! This is Ashutosh Kumar Verma. I am a software developer at MindStick Software Pvt Ltd since 2021. I have added some new and interesting features to the MindStick website like a story section, audio section, and merge profile feature on MindStick subdomains, etc. I love coding and I have good knowledge of SQL Database.
Ashutosh Kumar Verma
15-Oct-2024To split a
FullName
intoFirstName
andLastName
in SQL Server, you can use string functions like CHARINDEX, LEFT and RIGHT. Here is an example of how you can do this,Assuming you have an SQL table
Employees
with a columnEmpName
that contains the name in the format of “FirstName and LastName”,Here is the SQL Query to split the full name into first name and lastname
Example-