I have a column in Database called Full Name and I want split that name as FirstName and LastName:
Here is an Example:
FullName Sam Peter
I want this to be
FirstName LastName
--------------------
Sam Peter
But the Problem is Some of the columns in Database have Full Names Like this
FullName
--------
Sam George Jack Peter
Sam Adam Peter
I want this to be
FirstName LastName
--------- --------
Sam George Jack Peter
Sam Adam Peter
How do I write T-SQL Query for this.
Thanks in Advance for all the help