Query:
I have a string: DOE JOHN MICHAEL (last first middle)
I need to pull JOHN out of it
I can pull out DOE, and get the length of DOE, what I'm having trouble with is how to pull JOHN out. I've been working on it for a while and getting frustrated, so I'm coming to the pros for help.
Here is what I have so far.
Expand|Select|Wrap|Line Numbers
- SELECT Left(tblUnit_Data_Current.NAME,InStr(1, tblUnit_Data_Current.NAME," ")-1) as LastName,
- Len (left(tblUnit_Data_Current.NAME,InStr(1, tblUnit_Data_Current.NAME," ")-1)) as LastNameLength
- FROM tblUnit_Data_Current;
thx
jm420a