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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Displaying half name in upper case & lower case

Author  Topic 

saranram_forum
Starting Member

9 Posts

Posted - 2011-03-08 : 01:21:41
Hi,
I need to know that how to display half name in upper case & other half in lower case.







Thanks,
Saran

Saravanakumar

Sachin.Nand

2937 Posts

Posted - 2011-03-08 : 01:31:24
How do you define first half and second half ?

Post some example.

PBUH

Go to Top of Page

saranram_forum
Starting Member

9 Posts

Posted - 2011-03-08 : 01:50:34
Hi Sachin,
Thanks for ur reply. I need to split the name into two parts.

Ex:RAJIVGANDHI
RAJIVgandhi

Saravanakumar
Go to Top of Page

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2011-03-08 : 02:36:38
declare @t table
(PName varchar(50))

Insert into @t
Select 'Test' union
Select 'Rajivgandhi' union
Select 'Sonia' union
Select 'Priyanka'

Select upper(Left(Pname, len(Pname)/2)) + Lower(Right(Pname, len(Pname) - len(Pname)/2)) from @t
Go to Top of Page

saranram_forum
Starting Member

9 Posts

Posted - 2011-03-09 : 00:57:57
Hi Bobra,

Thanks a lot.

Saravanakumar
Go to Top of Page

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2011-03-09 : 07:00:06
quote:
Originally posted by saranram_forum

Hi Bobhra,

Thanks a lot.

Saravanakumar



You are welcome
Go to Top of Page
   

- Advertisement -