Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Access
3rdpartyusrgrp
access
activexcontrol
adp.sqlserver
commandbarsui
conversion
dataaccess.pages
developers.toolkitode
devtoolkits
externaldata
forms
formscoding
gettingstarted
internet
interopoledde
macros
modulescoding
modulesdaovba
modulesdaovba.ado
multiuser
odbcclientsvr
queries
replication
reports
security
setupconfig
tablesdbdesign
  
 
date: Fri, 4 Jul 2008 07:11:01 -0700,    group: microsoft.public.access.queries        back       


Simple update query question   
I have a table containing city names.  They are all in uppercase.  I'm trying 
to use an update query to change them all to proper case (first letter upper, 
the rest lower).  What do I put in the update to: field of the query to 
achieve this?

TIA

KM
date: Fri, 4 Jul 2008 07:11:01 -0700   author:   K M

Re: Simple update query question   
Try

StrConv([City Name],3)

That will handle names like San Francisco and Las Vegas as well as 
London, Rio De Janeiro, etc.

It will not be perfect since each separate word will be capitalized, so 
  Rio de Janeiro will end up as Rio De Janeiro.  But that is close and 
you could always manually fix the problem.



'====================================================
  John Spencer
  Access MVP 2002-2005, 2007-2008
  The Hilltop Institute
  University of Maryland Baltimore County
'====================================================


K M wrote:
> I have a table containing city names.  They are all in uppercase.  I'm trying 
> to use an update query to change them all to proper case (first letter upper, 
> the rest lower).  What do I put in the update to: field of the query to 
> achieve this?
> 
> TIA
> 
> KM
date: Fri, 04 Jul 2008 10:30:14 -0400   author:   John Spencer

Re: Simple update query question   
On Fri, 4 Jul 2008 07:11:01 -0700, K M wrote:

> I have a table containing city names.  They are all in uppercase.  I'm trying 
> to use an update query to change them all to proper case (first letter upper, 
> the rest lower).  What do I put in the update to: field of the query to 
> achieve this?
> 
> TIA
> 
> KM

StrConv([City],3)

Unfortunately this will incorrectly capitalize some city names. The
two that come to mind just now are Coeur d'Alene, Idaho will become
Coeur D'alene and King of Prussia, Pennsylvania will become King Of
Prussia. There are others.
-- 
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
date: Fri, 4 Jul 2008 07:30:42 -0700   author:   fredg lid

Re: Simple update query question   
Thanks for the quick reply.  I anticipated the names with two words, but the 
bulk of the records will be my city which is only one word, the rest I can do 
manually without too much pain.
Again, thanks for the help.

KM 

"fredg" wrote:

> On Fri, 4 Jul 2008 07:11:01 -0700, K M wrote:
> 
> > I have a table containing city names.  They are all in uppercase.  I'm trying 
> > to use an update query to change them all to proper case (first letter upper, 
> > the rest lower).  What do I put in the update to: field of the query to 
> > achieve this?
> > 
> > TIA
> > 
> > KM
> 
> StrConv([City],3)
> 
> Unfortunately this will incorrectly capitalize some city names. The
> two that come to mind just now are Coeur d'Alene, Idaho will become
> Coeur D'alene and King of Prussia, Pennsylvania will become King Of
> Prussia. There are others.
> -- 
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail
>
date: Fri, 4 Jul 2008 08:25:01 -0700   author:   K M

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us