A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Replacing individual characters in a field to something else.



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2010, 12:55 AM posted to microsoft.public.access.queries
vander via AccessMonster.com
external usenet poster
 
Posts: 5
Default Replacing individual characters in a field to something else.

I have a field with names that is pulled from a main frame database. These
names have the last name first, then a comma, then the first name. I want to
get rid of the commas. I can do this easily enough with the edit replace.
But this table will be constantly updated from the main frame Db. I want to
build it as part of an automatic process when running the update. I though
of using an update query, using a wildcard to find the commas, but cannot
figure out how to update just the character. It wants to update the untire
contents of the field.

any thoughs?

--
Message posted via http://www.accessmonster.com

  #2  
Old April 30th, 2010, 01:51 AM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Replacing individual characters in a field to something else.

On Thu, 29 Apr 2010 23:55:48 GMT, "vander via AccessMonster.com" u59668@uwe
wrote:

I have a field with names that is pulled from a main frame database. These
names have the last name first, then a comma, then the first name. I want to
get rid of the commas. I can do this easily enough with the edit replace.
But this table will be constantly updated from the main frame Db. I want to
build it as part of an automatic process when running the update. I though
of using an update query, using a wildcard to find the commas, but cannot
figure out how to update just the character. It wants to update the untire
contents of the field.

any thoughs?


How are you doing the "pulling" - with an update query, an append query, or
what? In either of these you can use a calculated field such as

Replace([fullname], ",", "")

and update the target table to this string; it will replace "Vinson, John"
with "Vinson John".

However, I'd really recommend having separate FirstName and LastName fields
and migrating your data into these fields. If you could describe the update
process and how you'll be using the local table we'd be able to help.
--

John W. Vinson [MVP]


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.