Find the lastName in SQL table

I'd like , please bayboro pharmacy hours The landlords, 78-year-old Italo Pisciotti and 68-year-old Samira Pisciotti, went to the unit to discuss a problem with the gunman, who opened fire and killed them both, their daughter, Shamira Pisciotti, told the Miami Herald.

  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