Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to split First and Last Name in the same field

Posted on 2004-08-30
5
Medium Priority
?
2,262 Views
Last Modified: 2012-08-14
I have imported a database from Excel where First and Last name are in the same field.
I would like to split the First and the Last Name in 2 different fields First Name and Last Name.
Does somebody know a script able to do that for all my records quickly ?
Thanks
0
Comment
Question by:hainaux
  • 2
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
lesouef earned 500 total points
ID: 11929488
Use extraction functions.
Only people with composite names is a problem.
So strip the names as follows:
First word to surname, rest to firstname.
Hopefully the composite name have hyphens (-). If not, the 2nd name may be put to firstname...
So better check manually for people having more than 2 words in the original name.
Do this after import using the replace function. Do not delete the original field untill sure about name stripping has been checked ok.
It should look like:
Display all records
replace (surname ; motsdebut (original name ; 1))
replace (firstname; motsextrait (original name ; 2; nombre de mots (original name)-1)
create a field "size" = nombre de mots (original size)
search those where size > 2
check for any weird firstname.

0
 

Author Comment

by:hainaux
ID: 11931050
Everything has been ok.
The only thing is : How to stop a script within a 'boucle' when the last record is reached.
Boucle
zczc
zxcvzcv
zxcvzv
fin de boucle
Each time I have to stop with Escape button and modify the last record
0
 
LVL 28

Expert Comment

by:lesouef
ID: 11931949
there is a setting (checkbox at the bottom of the window when you click on record next (exit script after last = fin de script après dernière).
0
 

Author Comment

by:hainaux
ID: 11932563
ok thank you very much
0
 

Expert Comment

by:Akostech
ID: 22035994
how can this be done programatically with tsql??
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline
Suggested Courses

972 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