syscolumns.collength for DATATIME?
Posted in 1996
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Page 2-18 of the Informix Guide to SQL: Reference Manual defines the formula
for column syscolumns.collength for DATETIME values as follows:
(length * 256) + (largest_qualifier_value * 16) + max_size
Does anyone have pseduo-code that will calculate what *length* is if I know
the value of syscolumns.collength?
Would somthing like this work?:
smalled_qualifier_value = syscolumns.collength % 16
temp = syscolumns.collength - smalled_qualifier_value
largest_qualifier_value = temp % 256
temp = temp - largest_qualifier_value
length = temp / 256
I'm trying to write a ESQL/C program that will give me the total key length
for each index on a table. "dbschema" will give a sum of all indexes for a
table in the comment for the table, but does not give the individual index
key lengths. Is there a better way to get that information besides querying
the system catalog tables directly?
TIA.