This is an SQL script to convert stored string data from hex base to integer ( read more )
The rest is here: HEX string value to int conversion.sql