Specifying Data Types Using Embedded Applications
Go Up to Fixed-decimal Data Types
DSQL applications such as isql
can correct for the scale factor for SMALLINT
and INTEGER
data types by examining the XSQLVAR sqlscale
field and dividing to produce the correct value.
- Important: Embedded applications cannot use or recognize small precision
NUMERIC
orDECIMAL
data types with fractional portions when they are stored asSMALLINT
orINTEGER
types. To avoid this problem, create allNUMERIC
andDECIMAL
data types that are to be accessed from embedded applications with a precision of 10 or more, which forces them to be stored as 64-bit integer types. Remember to specify a scale if you want to control the precision and scale.
Both SQL and DSQL applications handle NUMERIC
and DECIMAL
types stored as 64-bit integer without problem.