Extracting varried items from Name field

  • Thread starter Thread starter ar013871 via AccessMonster.com
  • Start date Start date
A

ar013871 via AccessMonster.com

Okay, here's what I'm running into. We have a HUGE CSV file whose data is
just not formatted in a good way. For example:

Smith,Joe
Smith, Joe
Smith\, Joe

All represent the same person, however, hase three different records. What
I'm wanting to do is run an Update statement that would make all the names be
formatted as Last,First with no space after the comma. Thoughts?
 
Okay, here's what I'm running into. We have a HUGE CSV file whose data is
just not formatted in a good way. For example:

Smith,Joe
Smith, Joe
Smith\, Joe

All represent the same person, however, hase three different records. What
I'm wanting to do is run an Update statement that would make all the names be
formatted as Last,First with no space after the comma. Thoughts?

And your version of Access is?

If your version of Access supports the replace function, you can use
an update query:

Update YourTable Set YourTable.[FieldName] =
Replace(Replace("\","",", ",""))

Be aware, that although the above will change all the field data to
LastName,FirstName as you requested, it is poor database design to
store both names in a single field. Create 2 new fields, LastName and
FirstName. Parse the data to the appropriate field. Look up the Split
function in VBA help.
 

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