Data typing

Unlike D3, SQL requires that each column has a predefined data type. For D3 SQL, the possible data types are CHAR, VARCHAR, INTEGER, SMALLINT, NUMERIC, DATE, TIME, and TIMESTAMP.

By default, SQL-CREATE-VIEW assigns data types to columns as described below:

For attribute-defining items containing an output conversion or correlative with a processing code beginning with mr, d, or mt. The following dictates the data type selected for the column descriptor:

For all remaining attribute-defining items, the following dictates the data type selected for the column descriptor:

If the data typing assigned by SQL-CREATE-VIEW using the basic syntax does not accurately describe the data, then manual assignment of data types using the advanced syntax is required. In some instances, ODBC-compliant applications may not support a particular data type. For example, if the TIME data type is not supported by an application, then the attribute-defining item can be assigned a data type of VARCHAR using manual data typing See Manual data typing.