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]

Leave a Reply

Your email address will not be published. Required fields are marked *