Answered
How do I convert a full name to firstname lastname
I need to parse some text that I have in a DB. I have over
5000 records to output, so I am hoping something will be
effiecient. However, it is a one time process, so it is not that
big of a deal.
I have a field 'fullName'. It contains a users full name (as the name implies). I need to output this so that the 'firstName' is in one field and the 'lastName' is in another field. The entries range from 'Jim Smith' to 'John C. Dvorak Jr.' (not really John, but I wanted to keep this interesting).
In the case of John, I need the first name and Middle initial to end up in the 'firstName' field and everything else in the last name field.
I tried to loop over using a space as the delimeter, but that just sepeates everything into parts. I need the middle initial to hang with the first name and anything trailing the last name to remain there.
Any clever thoughts? Help is much appreciated.
I have a field 'fullName'. It contains a users full name (as the name implies). I need to output this so that the 'firstName' is in one field and the 'lastName' is in another field. The entries range from 'Jim Smith' to 'John C. Dvorak Jr.' (not really John, but I wanted to keep this interesting).
In the case of John, I need the first name and Middle initial to end up in the 'firstName' field and everything else in the last name field.
I tried to loop over using a space as the delimeter, but that just sepeates everything into parts. I need the middle initial to hang with the first name and anything trailing the last name to remain there.
Any clever thoughts? Help is much appreciated.
