[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Extract FirstName and Surname from Name

Posted on 2000-04-11
5
Medium Priority
?
442 Views
Last Modified: 2008-03-06
Greetings To All
============

First my apology - I've asked before, used the answer and now I've
lost it.

I have a field [FirstNameandSurname] in an imported table.

I need to store [FirstName] and [Surname] separately.

Your advice will be saved somewhere safe this time.

Many thanks,

Robinski
0
Comment
Question by:robinski
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 10

Accepted Solution

by:
paasky earned 200 total points
ID: 2706613
Hello robinski,

UPDATE table1
SET FirstName = Left([FullName],Instr(1,[FullName]," ")-1),
    LastName = Mid([FullName],Instr(1,[FullName]," ")+1);

Regards,
Paasky
0
 
LVL 10

Expert Comment

by:paasky
ID: 2706616
LastName = SurName
0
 
LVL 4

Expert Comment

by:arcusd
ID: 2706617
are there any characters that separates the two fields (ie. ",") ?
anyway the sql statement may look like this

Update MyTable set FirstName = Mid([FirstNameandSurname],1,8),
LastName = Mid([FirstNameandSurname],9,20)


....this assumes that the first 8 char is the first name and and the
rest is the surname
0
 

Author Comment

by:robinski
ID: 2706645
paasky's answer was correct, it worked and it was first.

Many thanks.

robinski
0
 
LVL 10

Expert Comment

by:paasky
ID: 2706655
Happy to help you robinski.

Best regards,
Paasky
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question