Re: Update any Mcsmith to McSmith, etc . . .
- From: Jason Lepack <jlepack@xxxxxxxxx>
- Date: 30 Apr 2007 10:40:52 -0700
UPDATE
[Your Table Name]
SET
[Name Field] = Left([Name Field],2) & UCase(Mid([Name Field],3,1))
& Mid([Name Field],4)
WHERE [Name Field] Like "mc*";
Replace [Your Table Name] and [Name Field] with the appropriate names.
Cheers,
Jason Lepack
On Apr 30, 1:12 pm, Peter <P...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi gang,
I have a client who wants us to update a Last Name field to proper case for
any last name beginning with Mc. They want the 3rd character uppercased in
all such names. So any Mca . . ., Mcb . . . ., Mcc . . ., becomes McA . . .,
McB . . ., McC . . ., etc. You get the picture.
We are well aware that some names can actually be Mca . . . with the third
character retained in lower case. But the client wants all third characters
in upper case.
Anyway, I am look for a code that I could use to simply update the Last Name
field by running an update query.
Any ideas?
Thanks
Peter
ps - I have done a search on this subject, but the answers do not give me a
simple update query method . . .
.
- Prev by Date: Re: Date Range Query Not Returning Correct Results
- Next by Date: Re: Conditional Count
- Previous by thread: Re: Current datab only query
- Next by thread: Re: Update any Mcsmith to McSmith, etc . . .
- Index(es):
Relevant Pages
|