Solved

How to split First and Last Name in the same field

Posted on 2004-08-30
5
2,258 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 125 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

632 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