French Accent Marks Problem

  • Hi all,

    Does anyone know a workaround in T-SQL to retrieve names which has a french accent mark

    SELECT fname, lname FROM members WHERE lname = 'Hemond'

    this query doesn't bring the record for "Ms. Chantal Hémond" in the result set.

    Any Ideas?

  • You my friend have a collation problem. The problem is you are using accent sensitive collation. If you check your collation, it is probably SQL_Latin1_General_CP1_CI_AS. The problem with this collation is the last two letters "AS", which stands for accent sensitive. You will not be able to query the data as it stands, without changing the collation. I will provide you with a quick work around, but I will advise you to change your database collation. If you plan on storing this type of data, you do not want to have to "work around" to query it.

    SELECT fname, lname

    FROM members

    --this is the standard MS collation, but is Accent Insensitive

    WHERE lname = 'Hemond' COLLATE SQL_Latin1_General_CP1_CI_AI

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply