Automatic Conversion of Numeric Data Types |
Oracle OLAP automatically converts numeric data types according to the following rules:
When you use a value with the SHORTINTEGER or SHORTDECIMAL data type in an expression, then the value is converted to its long counterpart before using it. See "Boolean Expressions" for information about problems that can occur when you mix SHORTDECIMAL and DECIMAL data types in a comparison expression.
When you save the results of a calculation as a value with the SHORTINTEGER data type, then NA is stored when the result is outside the range of a SHORTINTEGER (-32768 to 32767).
When you assign the value of a DECIMAL expression to an object with the INTEGER data type, then the value is rounded before storing or using it.
|
Note: When aDECIMAL value is outside the range of an INTEGER, then an NA is stored.
|
When you use a decimal value where a value with the INTEGER data type is required, then the value is rounded before storing or using it.
|
Note: When the DECIMAL value is outside the range of an INTEGER, then an NA is stored. |
When you assign the value of a decimal expression to a variable with the SHORTDECIMAL data type, then only the first 7 significant digits are stored.
When you combine NUMBER values with other numeric data types, then all values are converted to NUMBER.
When these conversions are not what you want, then you can use the CONVERT, TO_CHAR, TO_NCHAR, TO_NUMBER, or TO_DATE functions to get different results.