We had some data that was, for reasons I dare not ask, in hex instead of decimal. Surprisingly there is no Oracle SQL function to convert numbers of one base to another (that I saw - if there is, please let me know). The convert() function in Sybase can do this, but the Oracle version works differently.
Anyway I came across this:
In SQL*Plus:sub to_dec { hex($_[0]); }
SQL> select to_dec('2A') from dual;
TO_DEC('2A')
------------
42
Re:Shameless self-promotion
djberg96 on 2004-08-05T04:42:35
Heh, nice. One of my missions in life is to port your code in order to create extproc_ruby.:)