Need a Select query that filter illegal characters
-
Hi All I am having sqlserver 2008R2 database, and in the table, there is a column "Text" with some string value. Some of the strings are good (have the characters entered from keyboard" where some have values like "degree" symbol. example:
Row 1 has string "Today temperature is 45Degrees C" where as Row 2 has string "Today temperature is 40°C
Row 2 has a symbol which is not entered through the keyboard. I want to filter such kind of symbols while querying. Is there a way to query that way by filtering? If so, please provide me such query. Thanks in advance, Usha
Naina
-
Hi All I am having sqlserver 2008R2 database, and in the table, there is a column "Text" with some string value. Some of the strings are good (have the characters entered from keyboard" where some have values like "degree" symbol. example:
Row 1 has string "Today temperature is 45Degrees C" where as Row 2 has string "Today temperature is 40°C
Row 2 has a symbol which is not entered through the keyboard. I want to filter such kind of symbols while querying. Is there a way to query that way by filtering? If so, please provide me such query. Thanks in advance, Usha
Naina
-
Hi All I am having sqlserver 2008R2 database, and in the table, there is a column "Text" with some string value. Some of the strings are good (have the characters entered from keyboard" where some have values like "degree" symbol. example:
Row 1 has string "Today temperature is 45Degrees C" where as Row 2 has string "Today temperature is 40°C
Row 2 has a symbol which is not entered through the keyboard. I want to filter such kind of symbols while querying. Is there a way to query that way by filtering? If so, please provide me such query. Thanks in advance, Usha
Naina
There are multiple ways to do it. i would suggest you should review your data to identify how many other invalid characters you have after this just use the simple REPLACE() function to remove those. Furthermore, if you are planing to create a function for this then you can look into this Link. hope it helps.