Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HEX TO DECIMAL HEX TO ASCII

DaveyBMay 20 2009 — edited May 21 2009
All,

I want to break down this hex string into two hex digits at a time and convert them into DECIMAL and ASCII.

So for example 03b5016f8b5dc59a would break down to 03 b5 01 etc
Then each on of those would be turned into its DECIMAL and ASCII equivelant and joined back together.

HEX DECIMAL ASCII
03b5016f8b5dc59a = 11121123123132 = ABCASDKDKAKSKD <-- For example not the real numbers used :)
WITH random_hex AS
(
    SELECT '03b5016f8b5dc59a' AS HEX FROM DUAL UNION ALL
    SELECT '02c40177c7467f8e' FROM DUAL UNION ALL
    SELECT '03b9016f8bc645e9' FROM DUAL
)
SELECT  hex
FROM    random_hex
;
This post has been answered by MichaelS on May 21 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2009
Added on May 20 2009
6 comments
10,990 views