home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / informix / 3051 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  3.0 KB

  1. Path: sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!swrinde!emory!emory!not-for-mail
  2. From: alan@effluvia.den.mmc.com (Alan Popiel)
  3. Newsgroups: comp.databases.informix
  4. Subject: Re:  Do you know the coltype converstion?
  5. Date: 25 Jan 1993 11:38:12 -0500
  6. Organization: Mailing List Gateway
  7. Lines: 76
  8. Sender: walt@mathcs.emory.edu
  9. Distribution: world
  10. Message-ID: <1k151kINNsvg@emory.mathcs.emory.edu>
  11. Reply-To: alan@effluvia.den.mmc.com (Alan Popiel)
  12. NNTP-Posting-Host: emory.mathcs.emory.edu
  13. X-Informix-List-ID: <list.1819>
  14.  
  15. ->From: riskit@x400gate.bnr.ca (Reg Foulkes)
  16. ->Subject: Do you know the coltype converstion?
  17. ->Date: Sun, 24 Jan 1993 13:23:06 GMT
  18. ->Reply-To: riskit@x400gate.bnr.ca (Reg Foulkes)
  19. ->Organization: Bell-Northern Research
  20. ->
  21. ->I need to build a lookup table for coltype in syscolumns. Does anyone have
  22. ->a list of the conversions?
  23. ->On my system if we do:
  24. ->
  25. ->    Select coltype from syscolumns 
  26. ->      where tabid = "some number" 
  27. ->
  28. ->I will get a list of numbers 
  29. ->
  30. ->0
  31. ->1
  32. ->2
  33. -> .
  34. -> .
  35. -> .
  36. ->256
  37. ->etc
  38. ->
  39. ->I know O is equivalent to Char and 256 is equivalent to Integer. Can anyone
  40. ->help me fill in the blanks. 
  41. ->thanks... 
  42. ->
  43. ->riskit@bnr.ca
  44. ->phone (613) 763-4131
  45. ->Ottawa, Ontario Canada.
  46.  
  47. Reg,
  48.  
  49. Your requested table is attached.  You made one error in your e-mail: 256 is 
  50. NOT 'integer', it is 'char(n) not null'.  In general, if coltype = x is type 
  51. 'y', then coltype = x+256 is type 'y not null'.
  52.  
  53. coltype         data type
  54.  
  55.       0         CHAR(n)         collength gives bytes (=n)
  56.       1         SMALLINT
  57.       2         INTEGER
  58.       3         FLOAT 
  59.       4         SMALLFLOAT
  60.       5         DECIMAL(n,m)    collength gives digits, encoded
  61.       6         SERIAL
  62.       7         DATE 
  63.       8         MONEY(n,m)      collength gives digits, encoded
  64.       9         INTERVAL        collength gives units
  65.      10         DATETIME        collength gives units
  66.  
  67.     256         CHAR(n)         NOT NULL
  68.     257         SMALLINT        NOT NULL
  69.     258         INTEGER         NOT NULL
  70.     259         FLOAT           NOT NULL
  71.     260         SMALLFLOAT      NOT NULL
  72.     261         DECIMAL(n,m)    NOT NULL collength gives digits
  73.     262         SERIAL          NOT NULL
  74.     263         DATE            NOT NULL
  75.     264         MONEY(n,m)      NOT NULL collength gives digits
  76.     265         INTERVAL        NOT NULL collength gives units
  77.     266         DATETIME        NOT NULL collength gives units
  78.  
  79. Translating the collength for DECIMAL, MONEY, INTERVAL, and DATETIME is 
  80. possible, but a pain.  If you need the info, let me know.
  81.  
  82. Regards,
  83. Alan
  84. +------------------------------+---------------------------------------+
  85. | R. Alan Popiel               | Internet: alan@den.mmc.com            |
  86. | Martin Marietta, LSC         | ( Please note: My opinions do not   ) |
  87. | P.O. Box 179, M/S 5422       | ( represent official Martin policy. ) |
  88. | Denver, Colorado 80201-0179  | Voice: 303-977-9998                   |
  89. +------------------------------+---------------------------------------+
  90.  
  91.