Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

ASCII Character Groups in String

By William Talada,

This function lets you accomplish some very difficult tasks with ease. If your server is case sensitive, you can still find all names entered in uppercase only. You can find comments containing extended ASCII characters. You can find which comments have formatting tabs and line feeds.

You can search on eight different classes of ASCII characters. You can search for their existence or absence in a string. Or you can pass null for the "don't care" classes.

The code is simple so you may redefine your own special categories such as "valid XML extended chars". The performance is acceptable for development and debugging conversions and upgrades.

This is really a swiss army knife in performing tasks that are nearly impossible otherwise.

Just create the function. The script at the end of the function's code will display how every ASCII character is categorized.

Total article views: 971 | Views in the last 30 days: 5
Related Articles

Function to find non-printable characters

The function is used to find non-printable ASCII characters in an input string.


Identifying ASCII characters in NVARCHAR columns

Identifying ASCII characters in NVARCHAR columns


Encoded text field in Foxpro truncated with no error

ASCII special character


character limitations on sp name, & function name

character limitations on sp name, & function name


ASCII Characters?

Hi Guys, I need to pass a ASCII character to a stored procedure as it uses this char as a seperator...

control characters    

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones