DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Carlos Fernandez Guest

    A toupper command available


    Hey I just wanted to know if anyone knew what the command for
    making some data in the SQL database into all upper or lower case
    and if it is possible to just affect all other letter besides the first one.
    For example if I wanted to alter
    TODAY'S NEWEST TECHNOLOGY IN THE MARKET
    to
    Today's newest technology in the market

    How would I do this please help thanx

    carlos

  2. #2
    Daniel Reber Guest

    Re: A toupper command available


    Carlos,
    You should first update the field to all lower case.

    UPDATE mytable
    SET myfield = lower(myfield)

    Then change the first letter to all upper case.

    UPDATE mytable
    SET myfield = upper(substring(myfield,1,1)) + substring(myfield,2,(LEN(myfield)-1))

    That should work for you.

    Daniel Reber, MCP



    "Carlos Fernandez" <cfernan29@loyaltyworks.com> wrote:
    >
    >Hey I just wanted to know if anyone knew what the command for
    >making some data in the SQL database into all upper or lower case
    >and if it is possible to just affect all other letter besides the first

    one.
    > For example if I wanted to alter
    >TODAY'S NEWEST TECHNOLOGY IN THE MARKET
    >to
    >Today's newest technology in the market
    >
    >How would I do this please help thanx
    >
    >carlos



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links