-1

I have a string like "Telugu,Praveen Kumar". I need to split this string like First_Name = Praveen, Last_Name= Telugu, Middle_Name= Kumar. Kindly help me out!!!

1 Answers1

0

Tryn this one:

UPDATE table
SET  FirstName  = SUBSTRING(FullName, CHARINDEX(',', FullName)+1, CHARINDEX(' ',FullName)-CHARINDEX(',', FullName)-1)
    ,MiddleName = SUBSTRING(FullName, 0, CHARINDEX(',', FullName))
    ,LastName   = SUBSTRING(FullName, CHARINDEX(' ', FullName)+1, LEN(FullName)-CHARINDEX(' ', FullName)+1)
Morte
  • 31
  • 6
  • select CONCAT(CONCAT(CONCAT(CONCAT('Telugu',','),'Praveen'),' '),'Kumar') as NAME from dual; I have this again I need to split them in separate columns. – PraveenKumarTelugu Oct 06 '17 at 11:53
  • I realy dont know whats your point.. i wrote you an update for table, where the full name is stored in 'FullName' column.. you wrote here some select without columns, just blind selected values. wtf man? :D – Morte Oct 06 '17 at 12:19