• works only partially - does not take in consideration that fact that some countries do have Accented alphas so the code as is removes them.

    Select dbo.fnTrimNonAlphaCharacters('âáÉéôô') will just return an empty string for example.

    one possible change to the code to allow for the above is

    WHERE N <= LEN(@pString)

    And (Ascii(SUBSTRING(@pString collate SQL_Latin1_General_CP1253_CI_AI,N,1)) between 97 and 122

    Or Ascii(SUBSTRING(@pString collate SQL_Latin1_General_CP1253_CI_AI,N,1)) between 65 and 90

    Or Ascii(SUBSTRING(@pString collate SQL_Latin1_General_CP1253_CI_AI,N,1)) = 32)