I have a column which stores full name. I need to parse this in First name, last name, middle name , prefix etc.
Req for middle name is to pick name which is between space and then name with A-z Chars and then space. Foe ex:
Name- My name is
Middle name-> name
Full name-> My n3ame is this
Middle Name-> is
Full name-> My name
Middle name-> NULL
I am not considering scenario where this double space is present twice for now. I am picking only the first occurrence in that case for now:
Ex:
Full Name-> My name is this
Middle name-> name
I was thinking below ( but this does not take care of middle name having only A-Z data, scenario 2 from above ex will give 'n3me' in this case instead of 'is'):
SUBSTR(FULL_name,Instr(Full_name,' '),Instr(Full_name,' ',2))