Oracle: How do I convert hex to decimal in Oracle SQL?

If you are using 8.1.5 and above you can use:

To convert from hexadecimal to decimal:

select to_number('AA', 'xx') from dual;     

To convert from decimal to hexadecimal:

select to_char(111, 'xxxx') from dual;

Leave a Comment