ADT follows rules to ensure the integrity of data written to the database and to properly follow SQL rules for writing to the database. The ADT rules prevent certain actions that would write either truncated data or too-large data to the database.These rules affect the following SQL statement when they write to the database:

  • CREATE TABLE AS SELECT
  • INSERT INTO ..... SELECT
  • UPDATE ... SET column = SELECT
  • CREATE INDEX

The ADT rule limitations are as follows:

  • If ADT is set to ON or ALL, and one of these statements encounter truncated data to write to the db, the statement raises an error. This prevents data loss.
  • If ADT is set to OUTPUT, and one of these statements encounter data that is larger than its defined size, the statement raises an error. This prevents doing the INSERT operation which SQL would normally never do. ADT OUTPUT handles large data for the purposes of the SELECT operation, but maintains the normal integrity of other SQL statement types. The error raised is either "column V at at rowid xxx in table T has value exceeding its max length or precision" for large data, or "array element value overflow" if an array element caused the problem. In the case of CREATE INDEX, the error message may also have a general form "CREATE INDEX failed as the SQLTruncateTooLarge flag is ON/OUTPUT and a column in the table has value exceeding its max length or precision.”