change a first-last to last, first

  • Thread starter Thread starter _Bigred
  • Start date Start date
B

_Bigred

Using Access 2000

I have a db with every single player that has ever played with the Milw.
Brewers.

But this table has the Player's Name

All in one field like such: John Doe (just a space between the first
& last name).

Is there a way to seperate this into two fields OR flip it and include a
comma
so it would either be
Last Name First Name
Doe John OR Doe,John

TIA,
_Bigred
 
Is the data always consistent? If so you can add two new fields and use an
update query which updates the new fields with expressions like:
Left([PlayerName], Instr([PlayerName]," ")-1)
and
Mid([PlayerName], Instr([PlayerName]," ")+1)
I would recommend against putting these back into one field. Store "Gorman"
and "Thomas" rather than "Thomas, Gorman".
 
Thanks Duane, I will check this out and let you know if it fix my issue.

_Bigred


Duane Hookom said:
Is the data always consistent? If so you can add two new fields and use an
update query which updates the new fields with expressions like:
Left([PlayerName], Instr([PlayerName]," ")-1)
and
Mid([PlayerName], Instr([PlayerName]," ")+1)
I would recommend against putting these back into one field. Store
"Gorman" and "Thomas" rather than "Thomas, Gorman".

--
Duane Hookom
MS Access MVP from WI


_Bigred said:
Using Access 2000

I have a db with every single player that has ever played with the Milw.
Brewers.

But this table has the Player's Name

All in one field like such: John Doe (just a space between the
first & last name).

Is there a way to seperate this into two fields OR flip it and include a
comma
so it would either be
Last Name First Name
Doe John OR Doe,John

TIA,
_Bigred
 
Back
Top