Rocky Smolin - Beach Access Software
bchacc at san.rr.com
Mon Apr 12 15:38:45 CDT 2004
Welford: I can see all kinds of mines in that field but if they're regular (ie, first name, space, middle initial if any followed by period and space, last name), then it's easy to parse using INSTR. The easiest would be to INSTR a period and break there if it found one. If no period is found then next I would INSTR the first space and break it there. If there are middle initials without periods then you'd have to scan backwards from the end of the name string, character by character, looking for the first space and break it there. This would be just a few lines of code and would execute fast enough so that you could run it and eyeball the results and see how accurate the first pass was. Then begin to add rules to refine the results - take care of the exceptions. Does it have to be 100% perfect? Are there titles on the Dr.s and Prof.s? Are there any compound last names separated by a space? Anyone with two middle names? Did I ask if it had to be 100% perfect? HTH Rocky Smolin Beach Access Software http://www.e-z-mrp.com ----- Original Message ----- From: "Coutts, Welford L." <COUTTSW at rjrt.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Monday, April 12, 2004 12:48 PM Subject: [AccessD] Separating First and Last Names I have received a large file containing a large number of Full Names. I need to separate the First Name and Middle Initial, if any, into one field and the Last Name into a separate field. What is the most efficient way to do this? Thanks! Welford Coutts ----------------------------------------- CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney-client or other legal privileges, and/or proprietary non-public information. If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution, or reproduction of this message and/or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful. -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com