dbTalk Databases Forums  

Raw data

comp.databases.oracle.server comp.databases.oracle.server


Discuss Raw data in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
NewtoOrcl
 
Posts: n/a

Default Raw data - 10-27-2011 , 12:30 PM






I am trying to get the utl_raw.cast_from_number function to pass data to
a 3rd party application. I am kind of confused as to how it gets
converted into a binary format. Are these hexadecimal values? Why do
the results vary so much in their length?


100 C202
200 C203
300 C204
400 C205
500 C206
1000 C20B
10000 C302
100000 C30B
1.2 C10215

Reply With Quote
  #2  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Raw data - 10-28-2011 , 05:15 PM






On Thu, 27 Oct 2011 13:30:36 -0400, NewtoOrcl wrote:

Quote:
I am trying to get the utl_raw.cast_from_number function to pass data to
a 3rd party application. I am kind of confused as to how it gets
converted into a binary format. Are these hexadecimal values? Why do
the results vary so much in their length?


100 C202
200 C203
300 C204
400 C205
500 C206
1000 C20B
10000 C302
100000 C30B
1.2 C10215
These are not hexadecimal values. 0xC202=49666. Raw values usually denote
how Oracle stores the results internally. I'm not sure that the way to
calculate those is well documented. Why don't you use binary integers
like this:SQL> select utl_raw.cast_from_binary_integer(100) from dual;

UTL_RAW.CAST_FROM_BINARY_INTEGER(100)
--------------------------------------------------------------------------------
00000064

Elapsed: 00:00:00.01
SQL> select utl_raw.cast_from_binary_integer(257) from dual;

UTL_RAW.CAST_FROM_BINARY_INTEGER(257)
--------------------------------------------------------------------------------
00000101

Those are hexadecimal values of 100 and 257 respectively.




--
http://mgogala.byethost5.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.