Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 LOWER

Author  Topic 

pazzy11
Posting Yak Master

145 Posts

Posted - 2007-09-28 : 06:34:21
Hi I know i can use a LOWER or UPPER function to change the
case of letters, but say i want to change all but the 1st letter
ie i want MARK SMITH to be Mark Smith ... MARK and SMITH
are 2 seperate columns so im assuming something like

select UPPER(first_name,1) ...

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-09-28 : 06:38:51
Start with this
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=15152

and then these
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=70951
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=25385
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=12509
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=62007
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=59616
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=59289
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=31306
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=26581



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-28 : 06:41:16
And this: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Proper%20Case

Sometimes also known as Title Case

Kristen
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-09-28 : 06:51:13
If you want to show result in Front ends like VB, then make use of StrConv function

StrConv(Rs("column"),vbProperCase)

or

Also refer

http://vyaskn.tripod.com/code/propercase.txt

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

pazzy11
Posting Yak Master

145 Posts

Posted - 2007-09-28 : 06:56:04
thanks
i came up with :

select ( LEFT(ct_surname,1) + LOWER(RIGHT(ct_surname,(len(ct_surname)-1))) ) from TABLE_NAME

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-28 : 07:01:00
What about:

de Someone
O'Reilly
McManus

?

Kristen
Go to Top of Page

pazzy11
Posting Yak Master

145 Posts

Posted - 2007-09-28 : 09:21:24
select ( UPPER(LEFT(ct_surname,1)) + LOWER(RIGHT(ct_surname,(len(ct_surname)-1))) ) from TABLE_NAME
Go to Top of Page
   

- Advertisement -