how to select a field with firstletter as capital and
remaining are small letters

Answer Posted / santosh kumar chhotaray

SELECT UPPER(SUBSTRING(<FieldName>,1,1))+LOWER(SUBSTRING(Name,2,LEN(<FieldName>))) AS
alliasename FROM tablename

Example
--------
SELECT UPPER(SUBSTRING(Name,1,1))+LOWER(SUBSTRING(Name,2,LEN(Name))) AS
name FROM tblInfo

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about SQL server 2005?

744


How to execute stored procedure and set temp table in sql server?

740


How to disconnect from a sql server using mssql_close()?

774


What is the difference between getdate and sysdatetime?

718


What happens if null values are involved in bitwise operations?

796






How to get a list of columns using the "sys.columns" view in ms sql server?

738


Can we use trigger new in before insert?

680


Explain system scalar functions?

748


What is the difference between mysql and mysqli?

752


what is blocking? : Sql server database administration

714


What are pessimistic lock and optimistic lock?

735


What is tempdb database? : SQL Server Architecture

785


What do you mean by 'normalization'?

784


What is wide table?

698


Characterize join and name diverse sorts of joins?

680