Remove the special character 'Æ' from the data

  • Hi,

    I have to remove the special character 'Æ' from my data, for this I have used the replace function - REPLACE(value,'Æ',CHAR(13)+CHAR(10))

    but the next problem arrive i.e. If my data is like 'WorkRole =GaEquipmentWorkRoleÆSecurity Filter=GAEquipmnetÆDescription=' then REPLACE

    function also replaces all the a following e like 'WorkRole =G quipmentWorkRole Security Filter=G quipmnet Description=' so i required that

    function which only remove 'Æ' so that my data will appear as 'WorkRole =GaEquipmentWorkRole Security Filter=GAEquipmnet Description='

  • Try using a binary collation

    REPLACE(value COLLATE Latin1_General_BIN,'Æ',CHAR(13)+CHAR(10))

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537
  • Hi,

    Thanks for your solution, it works for me.

    Can u please elaborate that what is the meaning or purpose of "COLLATE Latin1_General_BIN".

    Regards,

    Ankita

  • ankita.vinculum (6/11/2012)


    Hi,

    Thanks for your solution, it works for me.

    Can u please elaborate that what is the meaning or purpose of "COLLATE Latin1_General_BIN".

    Regards,

    Ankita

    Here is a good place to start

    http://msdn.microsoft.com/en-us/library/aa174903%28SQL.80%29.aspx

    Your default collation is treating 'Æ' and 'AE' as the same character, using a binary collation will ensure they are different characters.

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537

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

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