update query for reformating field contents

Posted on 2005-05-09
Last Modified: 2010-03-19

There is a requirement to change the formating of text names for 13,000 plus records. Currently all the names are in upper case - but we would like to have the first letter Ucase and the rest Lowercase. How would one write an update query to do this. Or perhaps there is some other method one could employ.

Question by:B_P_B
    1 Comment
    LVL 23

    Accepted Solution

    UPDATE TableName
    SET FieldName = UPPER(LEFT(FieldName, 1)) + LOWER(RIGHT(FieldName, LEN(FieldName) - 1))
    WHERE LEN(FieldName) > 0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    The steps for moving the system databases to a new location are documented in the following technical article: However sometimes after the moving process is finished, though SQL i…
    Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now