Re: syscolumns.collength
Posted in 1994
> Having created the following table ( INFORMIX Online 4.10 ) :
> create table times
> ( dtime1 datetime year to second,
> dtime2 datetime hour to second );
> I see the following values of COLLENGTH in the SYSCOLUMNS view:
> colname collength
> ------- ---------
> dtime1 3594
> dtime2 1642
> Can someone explain how INFORMIX calculates values for COLLENGTH for
> the DATETIME datatype ? I have tried various computations based on
> max and min values etc, but can't arrive at the above values :(
> Any documentation I have seen is somewhat vague on the subject, and
> the COLLENGTH column remains a bit of a mystery to me.
Andrew,
The information that you seek is found in the Guide to SQL Reference
manual (page 2-13 in the 4.10 manual). The datetime collength is as follows:
(length x 256) + (largest_qualifer value x 16) + smallest_qualifier value
If you need additional information on this, I can send you the code that I
use to break this down.
------------------------------------------------------------------------------
John M. Shoemaker internet: shoemaker@tweety.digsys.com
Daugherty Systems UUCP: uunet!fms2000!johns
One City Place, Suite 240 FAX: (314) 432-8217
St Louis, MO 63141 Voice: (314) 432-8200
------------------------------------------------------------------------------
EXEC SQL include "disclaimer.h";
------------------------------------------------------------------------------