Split Name Field into two Fields

G

Guest

I have a table with a single name field lastname, first name. I need to
split it into two new fields last name and first name.

What is the string that I plug into my query and do I set it up as a update
query to the new fields?
 
F

fredg

I have a table with a single name field lastname, first name. I need to
split it into two new fields last name and first name.

What is the string that I plug into my query and do I set it up as a update
query to the new fields?

If the full names are stored exactly as
Last Name comma space First Name:

(Note... back up your table first!!!)

Update YourTable Set YourTable.LastName =
Left([FullName],InStr([FullName],",")-1), FirstName =
Mid([FullName],InStr([FullName],",")+2)

If the names are in a different layout, you'll need to do some more
work and adjust the above expression accordingly..
 
I

i_takeuti

PJ said:
I have a table with a single name field lastname, first name. I need to
split it into two new fields last name and first name.

What is the string that I plug into my query and do I set it up as a
update
query to the new fields?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top