• Sowbhari - Tuesday, December 12, 2017 3:09 AM

    Michael L John - Monday, December 11, 2017 11:11 AM

    It also truncates the string if there are double spaces. 

    I used:
    'This Is a Test of this function'
    it returned
    'This Is A Test'

    Could you please post the complete code you used as the above logic which Chris posted returns correctly, where the string has multiple spaces without any truncation.


    DECLARE @String varchar(2000) = 'This Is a Test  of this function'
    SELECT dbo.fnProperCase(@String), @String

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/