Column Attributes - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

Product
ODBC Driver for Teradata
Release Number
16.20
Published
August 2020
Language
English (United States)
Last Update
2020-08-25
dita:mapPath
fxv1527114222338.ditamap
dita:ditavalPath
Audience_PDF_product_legacy_odbc_include.ditaval
dita:id
B035-2526
lifecycle
previous
Product Category
Teradata Tools and Utilities
For all column attribute information retrieved using SQLColAttribute, the old driver returns values that vary based on the data. In the new driver, the following column attributes are based on another attribute or hard-coded to a specific value:
  • SQL_DESC_DATETIME_INTERVAL_PRECISION

    For all column types, in the new driver, SQL_DESC_DATETIME_INTERVAL_PRECISION = SQL_DESC_PRECISION.

  • SQL_DESC_PRECISION

    For all column types except for NUMERIC and DECIMAL, in the new driver, SQL_DESC_PRECISION = SQL_DESC_LENGTH.

Additionally, the following table lists by column type the column attributes the new Teradata ODBC Driver returns.

Column Type Column Attributes Returned by New Driver
BIGINT Octet length is 20.
DATE Display size is returned as a number of characters.
DOUBLE, FLOAT, or REAL Display size is 24.
Interval types
  • Octet length is 34
  • Display size is SQL_DESC_LENGTH + 1
  • SQL_DESC_SCALE = SQL_DESC_PRECISION
JSON Octet length is SQL_DESC_LENGTH * character size.
TIME Display size is returned as a number of characters.
TIMESTAMP Display size is returned as a number of characters.