15.10 - Teradata ODBC Driver SQL Types - ODBC Driver for Teradata

ODBC Driver for Teradata User Guide

prodname
ODBC Driver for Teradata
vrm_release
15.10
category
User Guide
featnum
B035-2509-035K

ODBC Driver for Teradata is limited to Period SQL database types as listed in Table 35.

 

Table 35: Teradata SQL Types for Period Database Types 

ODBC SQL Type Identifier

Teradata SQL Data Type

Definition in ODBC Driver for Teradata

SQL_PERIOD_DATE

PERIOD(DATE)

An anchored duration of dates

SQL_PERIOD_TIME

PERIOD(TIME) or PERIOD(TIME(n))

An anchored duration of times. The precision n is from 0-6, default = 6.

SQL_PERIOD_TIME_
WITH_TIME_ZONE

PERIOD(TIME
WITH TIME ZONE)
or
PERIOD(TIME(n)
WITH TIME ZONE)

An anchored duration of times, including time zone. The precision n is from 0-6, default = 6.

SQL_PERIOD_TIMESTAMP

PERIOD(TIMESTAMP) or
PERIOD(TIMESTAMP(n))

An anchored duration of time stamps. The precision n is from 0-6, default = 6.

SQL_PERIOD_TIMESTAMP_
WITH_TIME_ZONE

PERIOD(TIMESTAMP
WITH TIME ZONE)
or PERIOD(TIMESTAMP(n) WITH TIME ZONE)

An anchored duration of time stamps, including time zone. The precision n is from 0 to 6, default = 6.

SQL_TD_FIXED_NUMBER

NUMBER(p) or
NUMBER(p, s)

Fixed Number data types are mapped to the standard SQL_DECIMAL data type

SQL_TD_FLOATING_NUMBER

NUMBER or
NUMBER(*) or
NUMBER(*,s)

Floating Number data types are mapped to SQL_DOUBLE.

SQL_TD_XML

XML

XML documents, and also non-well-formed text entities such as fragments of XML documents.

The ODBC SQL type values are defined in the header file tdsql.h in <InstallDir>/include, which defines Teradata-specific attributes for ODBC connection, statement, and descriptor objects.