Converting a column of Hex values to Decimal

0

I have an entire table column filled with 8 digit hex values, and I'd like to convert the entire column to their respective decimal equivalents. Does anybody have a SQL solution?

I've been playing around with this:

SELECT CONVERT(INT, 0x00000100)

but cannot figure out how to use this properly.

Basically I want this:

 Column 1
 --------
 598cc1a7
 5ad8ec5b
 59dbc0ba

To become this:

 Column 1
 --------
 1502396839
 1524165723
 1507573946

Thanks!

mysql
sql
hex
decimal
asked on Stack Overflow Jul 5, 2018 by Bob Duncan

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0