Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: % Negation Character
Citali wrote:
select utl_raw.bit_COMPLEMENT('c103') from dual;
UTL_RAW.BIT_COMPLEMENT('C103')
SELECT utl_raw.cast_to_number('3efc') FROM dual
UTL_RAW.CAST_TO_NUMBER('3EFC')
What I'm expecting is: 13 ...
cast_to_raw takes an Oracle number and shows you its hex representation. That's not the same as converting a binary number into hex. Use the CAST_FROM_BINARY_INTEGER (if you supply a 'normal' number or literal, there will be an implicit conversion of the parameter):
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jun 18 16:30:02 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect testuser/testuser
Connected.
SQL> select utl_raw.cast_from_binary_integer(256) from dual
2 /
UTL_RAW.CAST_FROM_BINARY_INTEGER(256)
Regards Nigel
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Jun 18 2007 - 10:40:58 CDT
![]() |
![]() |