Jul
18
First up Proper Case is really Title Case. And if you ever need to convert text to Title Case in SQL you can use Vyas Kondreddi’s PROPERCASE SQL script or David Wiesman’s PROPERCASE SQL script
My only change to their scripts would be to use NVARCHAR(MAX) or VARCHAR(MAX) as compared to their use of VARCHAR(8000), if your using SQL Server 2005 or above.
1: CREATE FUNCTION [dbo].[fProperCase]
2: (
3: @Value VARCHAR(8000),
4: @Exceptions VARCHAR(8000),
5: @UCASEWordLength TINYINT
6: )
7: RETURNS VARCHAR(8000)
8: AS
9: BEGIN
10: ...
11: END
So I would covert the above syntax when using SQL Server 2000 to the T-SQL below when using SQL Server 2005
1: CREATE FUNCTION [dbo].[fProperCase]
2: (
3: @Value VARCHAR(MAX),
4: @Exceptions VARCHAR(MAX),
5: @UCASEWordLength TINYINT
6: )
7: RETURNS VARCHAR(MAX)
8: AS
9: BEGIN
10: ...
11: END


