how to separate a complete name field into 2(first and last name )

G

Guest

I have to make a query that would allow me to see the Order ID, Customers
Name, Address, City, State,ZIp. The way the tables are set up there is no
separate first name and last name fields for each customer. But for the
result, i would like the name field to be separtated into First name and
Last Name. Is there a way to work with the the query which would spit out
the first name separately and last names separately
 
R

Rick B

Yes, but not reliably. You should change your table structure and separate
the two names. If you simply break the field apart based on the presence of
a space, what will happen with the following?

Billy Bob Thornton
Michael J Fox
John Smith Jr.
Rick Brown III
James de los Sotos

etc.
 
F

fredg

I have to make a query that would allow me to see the Order ID, Customers
Name, Address, City, State,ZIp. The way the tables are set up there is no
separate first name and last name fields for each customer. But for the
result, i would like the name field to be separtated into First name and
Last Name. Is there a way to work with the the query which would spit out
the first name separately and last names separately

How do we know what the first name is and what the last name is?

You'll have to post the exact layout of the name field, as how it is
done is determined by what is actually stored in the field, i.e.
"Green, Joe", or "Joe Green" or "Gorman, R. C." or "R. C. Gorman", or
"Robert Q. Lewis" , or "Jan van den Steen", etc.
 

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