I am writing an application which will do some formatting to CSV file and uploads the table to mysql after that the program should convert a (hex) column to decimal one
The table looks like this:
col1 | col2 | hexcol | deccol
So i need to take hexcol and convert from hex2dec and put it into deccol
I tried simple SELECT UNHEX('hexcol'); but it won`t work it says this colum is not in the field list ...
Any help would be appreciated ...
Try this:
SELECT CONV(hexcol, 16, 10);