Sample Header Ad - 728x90

Convert hex string representation to hex number in SQL Server T-SQL

0 votes
2 answers
4687 views
I have been given a dataset where hexadecimal numbers have been stored as a quasi-hex string representation intended to be human-friendly, e.g. "16A1". Is there a conversion function in T-SQL that will convert the string '16A1', or a modified version of it, into the hex number 0x000016A1?
Asked by Tim (545 rep)
Mar 24, 2023, 11:44 AM
Last activity: Mar 24, 2023, 04:41 PM