UTL_RAW binary encoding

From: neilsolent <n_at_solenttechnology.co.uk>
Date: Tue, 9 Jul 2013 10:28:46 -0700 (PDT)
Message-ID: <70f5affe-bf0a-467b-861d-74e3cedd37b9_at_googlegroups.com>

I need to get data from a query of an integer column into a client, stored as an array of 8 bytes. In the course of getting Oracle to return the data in the required format I am using the UTL_RAW functions, but I am struggling to understand what Oracle is returning. For example, can anyone explain these results?

SQL> select utl_raw.cast_from_number(5000) from dual;



SQL> select utl_raw.cast_from_number(131) from dual;



I am wanting a function that returns something like this:

20 -> 14
131 -> 83
5000 -> 1388

thanks Received on Tue Jul 09 2013 - 19:28:46 CEST

Original text of this message