Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Replacing Non-Alphanumeric values
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

14 Posts

Posted - 02/28/2013 :  11:48:36  Show Profile  Reply with Quote
Hello Guys,

I am trying to remove all non alphanumeric characters before displaying it in a column. I am using REPLACE function to remove special characters and replace with none. This is tedious as we have many special characters.
Can somebody suggest me more brief way to replace special characters with nothing?

Thanks in advance.

James K
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 02/28/2013 :  12:01:01  Show Profile  Reply with Quote
Unfortunately T-SQL string functions have nothing better to offer. If it supported regular expressions, it would be a much easier. So the only alternatives available currently are to either do it the painful way which you are doing, or to use a CLR function (which then can use all the features including the RegEx class in .Net).
Go to Top of Page

Flowing Fount of Yak Knowledge

4614 Posts

Posted - 02/28/2013 :  12:37:31  Show Profile  Reply with Quote
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000