Solved

How to split First and Last Name in the same field

Posted on 2004-08-30
5
2,250 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 125 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
ok thank you very much
0
 

Expert Comment

by:Akostech
Comment Utility
how can this be done programatically with tsql??
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
File Maker is not opening 4 528
Filemaker WebDirect Deployment 1 629
FM Exporting Pictures In Container 1 932
filemaker server 3 27
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now