kandukurip
Technical User
PLEASE HELP ME OUT.
I WANT TO PARSE THE PATIENT_NAME TO GET FIRSTNAME, LASTNAME AND MIDDLE INITIAL OUT OF IT.
EX PATIENT_NAME: MORRIS, BERTHA E
LASTNAME: MORRIS
FIRSTNAME: BERTHA
MIDDLE INITIAL: E
I AM USING SQL SERVER TO DO THAT.
select substring('MORRIS, BERTHA E',1,charindex(',','MORRIS, BERTHA E')-1)
select substring('MORRIS, BERTHA E',charindex(',','MORRIS, BERTHA E')+2,charindex(' ','MORRIS, BERTHA E')-2)
SO, I AM GETTING FIRST NAME AND LASTNAME, NOT MIDDLE INITIAL.
ALL NAMES DO NOT HAVE MIDDLE INITIALS.
THANKS IN ADVANCE
JOE
I WANT TO PARSE THE PATIENT_NAME TO GET FIRSTNAME, LASTNAME AND MIDDLE INITIAL OUT OF IT.
EX PATIENT_NAME: MORRIS, BERTHA E
LASTNAME: MORRIS
FIRSTNAME: BERTHA
MIDDLE INITIAL: E
I AM USING SQL SERVER TO DO THAT.
select substring('MORRIS, BERTHA E',1,charindex(',','MORRIS, BERTHA E')-1)
select substring('MORRIS, BERTHA E',charindex(',','MORRIS, BERTHA E')+2,charindex(' ','MORRIS, BERTHA E')-2)
SO, I AM GETTING FIRST NAME AND LASTNAME, NOT MIDDLE INITIAL.
ALL NAMES DO NOT HAVE MIDDLE INITIALS.
THANKS IN ADVANCE
JOE