var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Using Numeric Data Types
I'm using ASE 12.0 and i've a query regarding columns with numeric data type.
How the length is calculated from the precision and scale supplied while creating the table. eg: Numeric(12,3). How the length for the column is calculated.
Any help will be appreciated.
The storage size for a numeric or decimal column depends on its precision
select "prec"=colid, length=ceiling(colid/log10(256))+1
where id=16 and colid<39
order by colid
Thanks for the reply.
Can u pls explain what is actually meant by length of a column when we specify precision and scale as Numeric(12,3).
Thanks a lot
Length is the storage size
It takes ceiling(12/log10(256))+1=6 bytes to store a numeric(12,3)
Last edited by pdreyer; 01-23-07 at 08:42.
Originally Posted by pdreyer
But you have mentioned 'ceiling(colid/log10(256))+1'.
Please confirm how can you say that here column id =12.
In the 1st example I only used syscolumns as if it is a temp table with colid as a sequential sequence number rather then having to generate my own temp table with possible values for precision.