Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Tom asked why syscolumns.collength showed 4365 for a DATETIME YEAR TO FRACTION column. Jason Harris gave the formula (length * 256) + (first_qualifier * 16) + last_qualifier, so (17*256)+(0*16)+13 = 4365. Art Kagel added that the qualifier values and extraction macros are in datetime.h under $INFORMIXDIR/incl/esql. Solved.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
we have a table named role with a field of create_date and it is
DATETIME YEAR TO FRACTION
when i run this:
select * from syscolumns where tabid = (select tabid from systables where tabname = 'role')
the collength returns as 4365
anyone know why or how Informix interprets this? the 4365 collength?
thanks
tom
↪ replying to tomcaml@gmail.com
Jason Harris — — source: Usenet: comp.databases.informix
Hi Tom,
Check the syscolumns table in the system catalog tables section of the SQL Reference.
For datetime the calculation is:
(length * 256) + (first_qualifier * 16) + last_qualifier
For year to fraction(3) that is:
(17 * 256) + (0 * 16) + 13 = 4365
HTH,
Jason
Art Kagel — — source: Usenet: comp.databases.informix
The values for the parts of the qualifiers are found in the header file
datetime.h in $INFORMIXDIR/incl/esql along with macros to extract the
values.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Thu, Jan 24, 2013 at 7:35 AM, <tomcaml@gmail.com> wrote:
> Thank you much
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.