Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Faith has been described as a belief that runs ahead of the evidence
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!


How Do I Create a Sentence Case Text Field in SQL?

During a recent SQL server reporting writing project, the client wanted to display a text field that has various cases for the two values stored within, and wanted it standardised to sentence case.


Unfortunately, currently SQL does not have a ProperCase function, so to achieve this one has to use a combination of the UPPER and LOWER functions.

SELECT UPPER(LEFT(Tablename.Fieldname, 1)) +(LOWER(RIGHT(Tablename.Fieldname, LEN(Tablename.Fieldname)-1)))  AS [ProperCase Field]

FROM Table

If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us


Name *

Email Address *

Comment *