This stored procedure (SQL v7) / user function (SQL 2000) allows you to convert hex strings into integer numbers.
Examples:
SQL Server 2000.
PRINT dbo.HexToInt(‘0x7ffff’)SQL Server v7.x
DECLARE @intNumber INTEGER
EXECUTE @intNumber = HexToInt OUTPUT,’0x7ffff’
PRINT @intNumber
Author: Paul Hobbs
Download Script:
HexToInt.sql
Disclaimer: We hope that the information on these script pages is
valuable to you. Your use of the information contained in these pages,
however, is at your sole risk. All information on these pages is provided
“as -is”, without any warranty, whether express or implied, of its accuracy,
completeness, or fitness for a particular purpose…
Disclaimer Continued
Back to Database Journal Home