SDU Tools: Convert a hexadecimal character string to an integer in T-SQL

I mentioned in a previous post about how I sometimes need to work with binary strings in SQL Server using T-SQL.  The literal values are hexadecimal strings. T-SQL doesn't have a simple function to just convert one of these character-pair strings to an integer.

In our free SDU Tools for developers and DBAs, as well as the HexCharStringToChar function, we added a function HexCharStringToInt to do just this.

You can see the outcome in the main image above.

You can see it in action here:

 

To become an SDU Insider and to get our free tools and eBooks, please just visit here:

http://sdutools.sqldownunder.com

Leave a Reply

Your email address will not be published.