Re: How many bytes are required for numeric data ?

From: Tim Smith <tssmith_at_netcom.com>
Date: Thu, 20 Aug 92 01:44:47 GMT
Message-ID: <9!#nk0#.tssmith_at_netcom.com>


In article <Bt8v0D.uE_at_nntp-sc.Intel.COM> kortikar_at_mipos2.intel.com () writes:
>Oracle manual states following
>
>numeric data can use upto 21 bytes (22 bytes including length).
>
>all I could deduce was following
>in any numeric data
>1 byte is required for exponent+sign (what if the format is "9999" ?)
>1 byte is required for length
>>1 byte(s) for actual data.
>in this case vsize(column) should return minimum of 3. it seems to return 2.
>secondly is there any simple way by which given a format I can found out
>bytes required for that column. i.e picture '9999.99' -> 4 bytes
> '999999.99' -> 5 bytes etc.
>
>thanks in advance.
>
>Aniruddha Kortikar (kortikar_at_mipos2.intel.com)

If you can get hold of a late V6 or any V7 OCI manual, look at the description of the VARNUM external datatype (Chapter 3).

There are several examples there that show how many bytes are required for various numbers, and an explanation of how NUMBERs are stored.

--Tim (tssmith_at_oracle.com) Received on Thu Aug 20 1992 - 03:44:47 CEST

Original text of this message