Hyphen vs Dash : Replace Dash with Hyphen
Posted
by soldieraman
on Stack Overflow
See other posts from Stack Overflow
or by soldieraman
Published on 2010-05-07T02:28:24Z
Indexed on
2010/05/07
2:38 UTC
Read the original article
Hit count: 616
sql-server
|special-characters
Alright so we had a problem recently
In reporting services some of the String Columns were appearing as gibberish Chinese characters.
On further investigation we found it is the hyphen. Well that's what we though first. On further investigation we found it a dash (or en dash) . Basically the reason this has happened is people copy pasting values into this column from word which converts hyphens into dashes automatically.
But if you look at the database they both look the same. Though on the application side you can see the difference.
How do I replace the dash with a normal hyphen.
If you copy the value in put it in SQL server. A hyphen is gray while a dash is black but they both look exactly the same (i.e not bigger or smaller). Problem is I can't write a REPLACE script then (they are the freakin same)
REPLACE ('-' with '-')
is there a way special characters like the dash can be identified in SQL server?
SQL Server v 2005
© Stack Overflow or respective owner