I was looking for an easy to use function (udf) in SQL to convert any text to ‘Proper Case’ (also known as ‘Title Case’) and found Pinal’s blogpost:
Except, it wasn’t working properly for S’s or unicode strings…so I’ve added a few lines of code and here’s the result:
IMPORTANT: This UDF wasn’t build for performance, use it with care.
In my scenarios, I used it in my ETL processes just before inserting/updating the deltas/changes and thus minimizing the performance impact.
You’ve be able to download the T-SQL code here (just copy&paste the code into SSMS):
TextToProperCase – Unicode proof