UTL_RAW binary encoding - 2
From: neilsolent <n_at_solenttechnology.co.uk>
Date: Mon, 15 Jul 2013 12:22:26 -0700 (PDT)
Message-ID: <92c1ce14-98cd-43f7-8008-6550e2170836_at_googlegroups.com>
I seek a function similar to utl_raw.cast_from_binary_integer [see examples below] BUT I need it to: 1. Work with 8-byte numbers (not limited to 4 bytes) 2. Work with unsigned integers (negative numbers do not take up 1/2 of the "range"):
7FFFFFFF SQL> select utl_raw.cast_from_binary_integer(2147483648) from dual;
7FFFFFFF SQL> select utl_raw.cast_from_binary_integer(-1) from dual;
FFFFFFFF Received on Mon Jul 15 2013 - 21:22:26 CEST
Date: Mon, 15 Jul 2013 12:22:26 -0700 (PDT)
Message-ID: <92c1ce14-98cd-43f7-8008-6550e2170836_at_googlegroups.com>
I seek a function similar to utl_raw.cast_from_binary_integer [see examples below] BUT I need it to: 1. Work with 8-byte numbers (not limited to 4 bytes) 2. Work with unsigned integers (negative numbers do not take up 1/2 of the "range"):
Does anyone know how to create such a function?
Thanks,
Neil
SQL> select utl_raw.cast_from_binary_integer(2147483647) from dual;
UTL_RAW.CAST_FROM_BINARY_INTEGER(2147483647)
7FFFFFFF SQL> select utl_raw.cast_from_binary_integer(2147483648) from dual;
UTL_RAW.CAST_FROM_BINARY_INTEGER(2147483648)
7FFFFFFF SQL> select utl_raw.cast_from_binary_integer(-1) from dual;
UTL_RAW.CAST_FROM_BINARY_INTEGER(-1)
FFFFFFFF Received on Mon Jul 15 2013 - 21:22:26 CEST