View Full Version : Update Query Question


muskilh
06-07-2009, 10:14 PM
Hi,

What I'm looking to do is update certain fields in a table without replacing the entire field. Currently the field holds strings and I want to change all entries starting with either "abc", "abc ", "abc -", "abc - ", and "abc-" to start with "123 - ".

So for example I might have records like this:
"AbcJohn"
"abc - Jack"
"aBc-Jane"
"def Jill E"

and I want those to become:
"123 - John"
"123 - Jack"
"123 - Jane"
"def Jill E"

How could I do this in Access 2003?
The only way I could think of doing it so far is using the find/replace function but I was wondering if it was possible using something like update queries.

Thank you very much,

Muskilh

khawar
06-08-2009, 12:15 AM
Attached file contains a function to convert the text as you required I have used this in select query you use same function to update your data

muskilh
06-13-2009, 06:49 PM
Thank you for your reply. I completely forgot about modules...