I have a requirement to separate out Title, First Name and Last Name from Full Name from the table in the sql query
Conditions :
1 >If Title is like (MR.|MR|MRS|MRS.|MS.|MS|DR.|DR) then separate it out to the Title column.
2> The Last part of Full Name is always Last Name.
3>Whatever is left out after removing Title and Last Name is First Name.
Example 1:
If Full Name is MR. Amir Ali KHAN
Title: MR
First name: MR. Amir Ali
Last name: KHAN
The output of the sql query should look like
Title First_Name Last_name
MR Amir Ali KHAN
Example 2:
If Full Name is VENKAT MR MRS DR. SUBRAMANYAM
Title: <null>
First Name: VENKAT MR MRS DR.
Last Name: SUBRAMANYAM
The output of the sql query should look like
Title First_Name Last_name
Null VENKAT MR MRS DR SUBRAMANYAM
Thanks,