Re: Size of columns
Posted in 1995
> > From: chessec@aztec.co.za (Claude Chesselet) > > Subject: Size of columns > Can anyone help? > > I need to determine the length of columns from the syscolumns table where the > column type is a decimal and when attempting to determine the length I do not > know the precision or the scale of the column. > > Does anyone know how to do this? > > Assuming iColLength has the value from syscolumns:collength uHigh = (unsigned) iColLength / 256; uLo = (unsigned) iColLength % 256; if (uLo == 255) /* Floating Point */ sprintf(szType,"DECIMAL(%d)",uHigh); else sprintf(szType,"DECIMAL(%d,%d)",uHigh,uLo); I found _most_ of this in Informix Quide to SQL/Reference - chapter: System Catalog. Hope this helps... -- **-------------------------+---------------------------** |James Bennett | Phone: 916.891.5281 | |Bi-Tech Software, Inc | Fax : 916.891.5011 | |1072 Marauder, Suite A | EMail: james@bi-tech.com | |Chico, CA 95926 | "If it was easy, anyone | | | could do it." | **-------------------------+---------------------------**