Hi all,
I have a scenario where in I have different forms of data in a column NAME in a table.
Now I need to segregate it into First name and last name.
I have tried regular expression but it is either a pass for one scenario and fail for the other and vice versa.
Suppose I have data like
NAME
MERCEDES BENZ - > FNAME TO BE MERCEDES, LNAME TO BE BENZ
ALISHA CHENOY ALI - > FNAME TO BE ALISHA, LAST NAME AS CHENOY ALI
ALISHA-CHENOY, ALI -> FNAME TILL COMMA, ALI TO BE LNAME
ALISHA CHENOY, ALI - > SAME AS ABOVE
ALI'SHA CHENOY, ALI - > SAME AS ABOVE.
My general approach was to extract till the first comma is encountered or till the first space. But in some cases I have a space followed by comma.
Can anyone please be kind enough to help me with this.