Christoph's 2 Cents

A Backup for My Brain!

Oracle Developement

Converting a decimal number to hexadecimal.

Here is a handy little quickie to convert an any-length decimal number to a hexadecimal using the to_char function:

[sourcecode]
SELECT to_char(‘&str’,LPAD(‘X’,LENGTH(‘&str’),’X’)) FROM dual;
[/sourcecode]