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);
You can use CONV()
Check Similar question on stack overflow and Conv function reference & examples
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With