Search This Blog

October 05, 2009

How to conevert Hex value into integer format

Following any of the convertions will work if we want to convert HEX value into Int value in SQL


select
convert(int,CONVERT(binary(4),'0x99CCFF',1)),
convert(int,CONVERT(binary(4),'0x0099CCFF',1)),
convert(int,0x0099CCFF),
convert(int,0x99CCFF)