home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / oracle / 1320 < prev    next >
Encoding:
Text File  |  1992-08-19  |  1.4 KB  |  40 lines

  1. Newsgroups: comp.databases.oracle
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!mips!decwrl!csus.edu!netcom.com!tssmith
  3. From: tssmith@netcom.com (Tim Smith)
  4. Subject: Re: How many bytes are required for numeric data ?
  5. Message-ID: <9!#nk0#.tssmith@netcom.com>
  6. Date: Thu, 20 Aug 92 01:44:47 GMT
  7. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  8. References: <Bt8v0D.uE@nntp-sc.Intel.COM>
  9. Lines: 29
  10.  
  11. In article <Bt8v0D.uE@nntp-sc.Intel.COM> kortikar@mipos2.intel.com () writes:
  12. >Oracle manual states following
  13. >
  14. >numeric data can use upto 21 bytes (22 bytes including length).
  15. >
  16. >all I could deduce was following
  17. >in any numeric data 
  18. >1  byte is required for exponent+sign (what if the format is "9999" ?)
  19. >1  byte is required for length
  20. >>1 byte(s) for actual data.
  21. >in this case vsize(column) should return minimum of 3. it seems to return 2.
  22. >secondly is there any simple way by which given a format I can found out
  23. >bytes required for that column. i.e picture '9999.99' -> 4 bytes
  24. >                          '999999.99' -> 5 bytes etc.
  25. >
  26. >thanks in advance.
  27. >
  28. >Aniruddha Kortikar (kortikar@mipos2.intel.com)
  29.  
  30. If you can get hold of a late V6 or any V7 OCI manual, look at the
  31. description of the VARNUM external datatype (Chapter 3).
  32.  
  33. There are several examples there that show how many bytes are required
  34. for various numbers, and an explanation of how NUMBERs are stored.
  35.  
  36. --Tim (tssmith@oracle.com)
  37.  
  38.  
  39.  
  40.