Collection Contents Previous Next PDF

ASA Database Administration Guide

Database Options

Alphabetical list of options

TRUNCATE_TIMESTAMP_VALUES option [database]


Function  

Limits the resolution of timestamp values.

Allowed values  

ON, OFF

Scope  

Can be set for the PUBLIC group. This option should not be enabled for databases already containing timestamp data.

Default  

OFF

Description  

A TIMESTAMP value is precise to six decimal places in Adaptive Server Anywhere. However, to maintain compatibility with other software, which may truncate the TIMESTAMP value to three decimal places, you can set the TRUNCATE_TIMESTAMP_VALUES option to ON to limit the number of decimal places Adaptive Server Anywhere stores. The DEFAULT_TIMESTAMP_INCREMENT option determines the number of decimal places to which the TIMESTAMP value is truncated.

If the database server finds TIMESTAMP values with a higher resolution than that specified by the combination of TRUNCATE_TIMESTAMP_VALUES and DEFAULT_TIMESTAMP_INCREMENT, an error is reported.

In most cases, unloading the database and then reloading it into a new database in which the TRUNCATE_TIMESTAMP_VALUES and DEFAULT_TIMESTAMP_INCREMENT values have been set is the easiest solution to ensure the proper TIMESTAMP values are used. However, depending on the type of TIMESTAMP columns in your table, you can also do the following:

Example 

Setting the DEFAULT_TIMESTAMP_INCREMENT option to 100 000 causes truncation after the first decimal place in the seconds component, allowing a value such as '2000/12/05 10:50:53:700' to be stored.


Collection Contents Previous Next PDF