Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Weird

Re: Weird

From: Tim Gorman <tim_at_sagelogix.com>
Date: Mon, 15 Mar 2004 21:26:03 -0700
Message-ID: <BC7BCFEB.11853%tim@sagelogix.com>


Whoops! My meat-based decimal-to-hexadecimal translater mustıve fried a transistor (³64² decimal is ³0x40² hex, not ³0x08² hex). They say itıs the second thing to go, anyway...<sigh>...

> SQL> col nbr format 999,999,999,990.00
> SQL> select utl_raw.cast_to_number(hextoraw('4066')) nbr from dual;
>
> NBR
> -------------------
> -0.000
>

Well, thatıs not very illuminating... :-(

...seems that it took until the 6th century AD for Arabic scholars to discover the number ³0² and until the 21st century AD for Stephen Lee to discover the new number named ³bleen² (i.e. negative zero). Iım told it resides somewhere between 4 and 5...

on 3/15/04 9:10 PM, Tim Gorman at tim_at_sagelogix.com wrote:

> The "64" (i.e. hex 0x8) is the exponent, while the "102" (i.e. hex 0x66) is
> the significant digit in "base-100's complement" notation...
>
> So, this is what it looks like...
>

>> SQL> select utl_raw.cast_to_number(hextoraw('0866')) nbr from dual;
>> 
>> UTL_RAW.CAST_TO_NUMBER(HEXTORAW('0866'))
>> ----------------------------------------
>>                               -2.00E+108

>
> Looks like a pretty small number, if Iım reading it right...
>
>> SQL> col nbr format
>> 999999999999999999999999999999999999999999999999999999999999999
>> SQL> select utl_raw.cast_to_number(hextoraw('0866')) nbr from dual;
>> 
>>                                                              NBR
>> ----------------------------------------------------------------
>> ################################################################

>
>
>
> on 3/12/04 3:45 PM, Stephen.Lee_at_DTAG.Com at Stephen.Lee_at_DTAG.Com wrote:
>
>> > 
>> > By the way, I think this is coming from a Cobol app.  So, I suppose there
>> > could be something squirrel-ly going on with the cobol library.  Is there
>> > some way I can try to cram in a chr(64) chr(102) directly from sqlplus?
>> > 
>>> >> -----Original Message-----
>>> >> I think I am in need of some enlightenment here.
>>> >> 
>>> >>        AMT N_DUMP
>>> >> ---------- ----------------------------------------
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >> 
>>>> >>> -----Original Message-----
>>>> >>> 
>>>> >>> Have you tried to dump the column? See the example below (due
>>>> >>> to my language settings the decimal point is showing up as a comma.)
>>>> >>> 
>>> >> ----------------------------------------------------------------
>>> >> Please see the official ORACLE-L FAQ: http://www.orafaq.com
>>> >> ----------------------------------------------------------------
>>> >> To unsubscribe send email to:  oracle-l-request_at_freelists.org
>>> >> put 'unsubscribe' in the subject line.
>>> >> --
>>> >> Archives are at http://www.freelists.org/archives/oracle-l/
>>> >> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
>>> >> -----------------------------------------------------------------
>>> >> 
>> > ----------------------------------------------------------------
>> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
>> > ----------------------------------------------------------------
>> > To unsubscribe send email to:  oracle-l-request_at_freelists.org
>> > put 'unsubscribe' in the subject line.
>> > --
>> > Archives are at http://www.freelists.org/archives/oracle-l/
>> > FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
>> > -----------------------------------------------------------------

>


Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Mon Mar 15 2004 - 22:24:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US