Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

proper Case

Status
Not open for further replies.

dhulbert

Technical User
Jun 26, 2003
1,136
GB
Is there a tidy way in SQL to proper case a string. Currently I'm using

Code:
upper(left(TBL_PATNT.FORENAME,1))+ 
lower(right(TBL_PATNT.FORENAME,len(TBL_PATNT.FORENAME)-1))

This works fine but I was just hoping to find a way to make the code a little tidier.

Cheers.

I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 
just one more way:

select upper(substring('asd',1,1))+lower(substring('asd',2,len('asd')))

Not necessarily tidy ;)

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top