Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Print Hex value as string without 0x

$
0
0
select CONVERT(varbinary(max), 729231826, 2), 
	Substring(CONVERT(varbinary(max), 729231826, 2), 3, 8)

I am using above convert statement to convert my number (729231826) to hex value  so i get result as

0x2B7731D2

I need to get rid of 0x.. so output should be

2B7731D2 ..

As u can see i tried substring but then my output is 0x31D2.

Kindly Help.

Thanks,

Nilay


Thanks, Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>