Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to split First and Last Name in the same field

Posted on 2004-08-30
5
Medium Priority
?
2,259 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
[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
  • 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

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…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

722 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