Last Name First Name Invert

  • Thread starter Thread starter David Kennedy
  • Start date Start date
D

David Kennedy

I use Msaccess 2000 in wndows 2000 professional
environment. Field [last first]in database has names i.e.
Smith, John
Jones, Robert H
Porta, Michael de La

I want to place data into fields, [first], [last] and
[first last], ie switch info after comma

Database does not contain name suffix such as Jr., II,
Help would be appreciated.
 
David

If your current field contains two names (last, first) and punctuation
(comma, space), why would you want to put two facts (first, last) into
another field?! Especially when you already had a field with first and a
field with last.

A couple notions in relational db design: don't redundantly store
information (same fact in more than one field), and don't put more than one
fact in one field.

To break apart the current field, take a look at Access HELP on the Left(),
and Mid() functions, and the InStr() function. The general concept is that
you'll build a query that returns the firstname and lastname values, using
those functions on the lastnamefirst field you currently have.

Once your select query successfully breaks apart first and last names, you
can change it to an update query, to use to update your revised table
structure -- NOTE: you may need to include the key field to update the
correct rows.

NOTE2: I was under the impression that "de la Porta" was a lastname -- you
may have to "manually" adjust the results after updating!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top