How to change- name to last name, and first name?

C

Cai

I have a database of more than 10K names and need to separate the name field
into last name and first name fields.
 
O

Ofer

What separate between the two?
What do you have first? first name or last name

Incase there is a space separation, you can create a query that will split
the two names

Select left(NameField,instr(NameField," ")-1) As FirstName,
Mid(NameField,instr(NameField," ")+1) As LastName From TableName
 
G

GAVO-UK

Cai said:
I have a database of more than 10K names and need to separate the name field
into last name and first name fields.

I can be easily separated into name and surname if all records have the
same number of "firstnames". One way could be by producing a delimited
txt file or even copy and past into excel and doing it from there, but
if there are records with different numbers of "firstnames" then, I
don't think there is a straight forward way of doing it.

GAVO
 
D

Douglas J. Steele

Unfortunately, it's a non-trivial thing to do. The problem is that there are
no hard-and-fast rules.
Mary Lou Retton has a first name of Mary Lou and a last name of Retton, but
Ludwig von Beethoven has a first name of Ludwig and a last name of von
Beethoven

Mike Labosh outlines a good approach in
http://www.mcse.ms/archive147-2004-11-1255905.html and there's also a KB
article about this at http://support.microsoft.com/?kbid=168799

You might also take a look at purchasing Splitter for Microsoft Access, from
Info Plan Software: http://www.infoplan.com.au/splitter/
 
Top