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 2000 Forums
 SQL Server Development (2000)
 Updating first character of column

Author  Topic 

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2006-05-02 : 19:17:19
Hi
Suppose i have a table with name column
And i want that only the first character in my name column should be capital
like
Nitin
Nikhil
Please help
Regards

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-05-02 : 19:27:28
UPDATE YourTable
SET Column1 = UPPER(SUBSTRING(Column1, 1, 1)) + SUBSTRING(Column1, 2, DATALENGTH(Column1))


Tara Kizer
aka tduggan
Go to Top of Page

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2006-05-02 : 19:32:48
Thanks again..
Regards
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-03 : 02:35:47
or

Without updating just show it when selecting

Select UPPER(SUBSTRING(Column1, 1, 1)) + SUBSTRING(Column1, 2, DATALENGTH(Column1))
from yourTable

Madhivanan

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

- Advertisement -