Find the lastName in SQL table

A few months que es zyprexa olanzapina The go-private transaction has dragged on for months,jeopardizing the future of the computer maker facing a declinein its core business of personal computers amid the growingpopularity of tablets. Michael Dell has said a turnaround ofDell should be done away from the scrutiny of public investors.

  Devbrat Tripathi

Hi,

i believe below is the correct answer.

SELECT SUBSTRING(fullname, 1, CHARINDEX(' ', fullname) - 1) AS Firstname,     
       SUBSTRING(fullname,
                 CHARINDEX(' ', fullname) + 1,
                 LEN(fullname) - CHARINDEX(' ', fullname)) AS Lastname
FROM yourTable                

  Rakesh Sharma       23 Sep 2018       1       0     

Post Your Answers:

Please use the CODE HIGHLIGHT Button to format/highlight your codes if any