Results 1 to 5 of 5

Thread: T_sql

  1. #1
    Join Date
    Apr 2004
    Location
    Melbourne
    Posts
    144

    Unanswered: T_sql

    How do i use T-SQL to switch the lastname CASEY to Casey ?

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Familiarize yourself with the various string manipulation functions and how they can be combined:
    Code:
    declare	@YourString varchar (25)
    set	@YourString = 'bLinDmaN'
    select	Upper(left(@YourString, 1)) + Lower(Substring(@YourString, 2, len(@YourString)-1))
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    May 2002
    Posts
    299
    What you want is proper_case. You can find some code here (courtesy of
    Vyas).


    http://vyaskn.tripod.com/code/propercase.txt
    --
    -oj
    http://www.rac4sql.net

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by oj_n
    What you want is proper_case. You can find some code here (courtesy of
    Vyas).


    http://vyaskn.tripod.com/code/propercase.txt
    I wonder what prompted Vyas called his function PROPERCASE and not ProperCase?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    If you ran PROPERCASE through his function, you would get Propercase, not ProperCase. So he should have named it 'Propercase'.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •