How to Convert Dec to Any Base in SQL
If you want to convert decimal (base 10) to to hexadecimal (base 16) in SQL you can do so easily with the built in to_char functionality:
select trim(to_char(300, 'XXXXX')) dec2hex
from dual;
DEC2HEX
12C
What if you wanted to convert a decimal numb...
talkapex.com4 min read