June 11, 2012 at 4:09 am
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='
June 11, 2012 at 4:22 am
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/61537June 11, 2012 at 4:31 am
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
June 11, 2012 at 4:46 am
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/61537Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply