How to find precision and scale for decimal
Posted in 2012
Topics: General Discussion
System: IBM Informix Dynamic Server Version 9.40.UC6W4 Hi guys, sorry for my bad language but i'll try to describe my problem. Where is the precision and scale for decimal located? I have a database an i'm looking for the precision and scale in the syscolumns table. Would you be so kind to help me? Thanking you in anticipation. Greets Michael
It is encoded in syscolumns.collength. Here's a snippet from the code to
my dbschema replacement utility, myschema, where it decodes the column:
case SQLDECIMAL:
if ((syscolumns.collength % 256) == 255)
/* Floating point. */
fprintf( outfile,
"DECIMAL(%d)",
syscolumns.collength / 256 );
else
/* Fixed point. */
fprintf( outfile,
"DECIMAL(%d,%.1d)",
syscolumns.collength / 256,
syscolumns.collength % 256 );
break;
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 Tue, Mar 13, 2012 at 10:42 AM, Michael Weber <
michael.weber@fh-stralsund.de> wrote:
> System: IBM Informix Dynamic Server Version 9.40.UC6W4
>
> Hi guys,
>
> sorry for my bad language but i'll try to describe my problem.
>
> Where is the precision and scale for decimal located? I have a database
> an i'm looking for the precision and scale in the syscolumns table.
>
> Would you be so kind to help me?
>
> Thanking you in anticipation.
>
> Greets Michael
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>