17.20 - Converting Data between SQL Types and C Types - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

Product
ODBC Driver for Teradata
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2022-06-21
dita:mapPath
uqj1639470627591.ditamap
dita:ditavalPath
nkw1500504256726.ditaval

Starting with the 16.20 version of the driver, when converting data between a SQL type and a C Interval type, ODBC Driver for Teradata returns some results differently based on supporting more conversions.

In 16.10 and prior versions, ODBC Driver for Teradata did not support the following conversions and returned SQLState 07006. Starting with 16.20, ODBC Driver for Teradata converts the data successfully as shown below:
  • Numeric types (BIGINT, BIT, DOUBLE, FLOAT, INTEGER, REAL, SMALLINT, TINYINT) to:
    • INTERVAL DAY TO HOUR
    • INTERVAL DAY TO MINUTE
    • INTERVAL DAY TO SECOND
    • INTERVAL HOUR TO MINUTE
    • INTERVAL HOUR TO SECOND
    • INTERVAL MINUTE TO SECOND
  • INTERVAL DAY to INTERVAL SECOND
  • INTERVAL HOUR to INTERVAL SECOND
  • INTERVAL DAY TO HOUR to INTERVAL SECOND
  • INTERVAL DAY TO SECOND to INTERVAL SECOND
  • INTERVAL HOUR TO MINUTE to INTERVAL SECOND
  • INTERVAL MONTH to INTERVAL YEAR
  • INTERVAL HOUR to INTERVAL DAY
  • INTERVAL MINUTE to INTERVAL DAY
  • INTERVAL MINUTE to INTERVAL HOUR
  • INTERVAL MINUTE to INTERVAL DAY TO HOUR
  • INTERVAL SECOND to INTERVAL DAY
  • INTERVAL SECOND to INTERVAL HOUR
  • INTERVAL SECOND to INTERVAL MINUTE
  • INTERVAL SECOND to INTERVAL DAY TO HOUR
  • INTERVAL SECOND to INTERVAL DAY TO MINUTE
  • INTERVAL SECOND to INTERVAL HOUR TO MINUTE
  • INTERVAL YEAR TO MONTH to INTERVAL YEAR
  • INTERVAL DAY TO HOUR to INTERVAL DAY
  • INTERVAL DAY TO MONTH to INTERVAL DAY
  • INTERVAL DAY TO MONTH to INTERVAL HOUR
  • INTERVAL DAY TO MONTH to INTERVAL DAY TO HOUR
  • INTERVAL DAY TO SECOND to INTERVAL DAY
  • INTERVAL DAY TO SECOND to INTERVAL HOUR
  • INTERVAL DAY TO SECOND to INTERVAL MINUTE
  • INTERVAL DAY TO SECOND to INTERVAL DAY TO MINUTE
  • INTERVAL DAY TO SECOND to INTERVAL HOUR TO MINUTE
  • INTERVAL HOUR TO MINUTE to INTERVAL DAY
  • INTERVAL HOUR TO MINUTE to INTERVAL HOUR
  • INTERVAL HOUR TO MINUTE to INTERVAL DAY TO HOUR
  • INTERVAL HOUR TO SECOND to INTERVAL DAY
  • INTERVAL HOUR TO SECOND to INTERVAL HOUR
  • INTERVAL HOUR TO SECOND to INTERVAL DAY TO HOUR
  • INTERVAL MINUTE TO SECOND to INTERVAL DAY
  • INTERVAL MINUTE TO SECOND to INTERVAL HOUR
  • INTERVAL MINUTE TO SECOND to INTERVAL MINUTE
  • INTERVAL MINUTE TO SECOND to INTERVAL DAY TO HOUR
  • INTERVAL MINUTE TO SECOND to INTERVAL DAY TO MINUTE
  • INTERVAL MINUTE TO SECOND to INTERVAL HOUR TO MINUTE
  • SQL_C_DOUBLE to SQL_INTERVAL_MONTH
  • SQL_C_DOUBLE to SQL_INTERVAL_YEAR
  • SQL_C_FLOAT to SQL_INTERVAL_MONTH
  • SQL_C_FLOAT to SQL_INTERVAL_YEAR