Example: Implicit Conversion of Character to TIME - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
zsn1556242031050.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantageā„¢

The following CREATE TABLE statement specifies a FORMAT phrase for the TIME data type column:

CREATE SET TABLE timetab (f1 TIME(0) FORMAT 'TBHHhMImSSs');

In field mode, the following INSERT statement successfully performs the character to TIME implicit conversion because the format of the string conforms to the format of the TIME column in the timetab table:

INSERT INTO timetab ('AM 10h20m30s');

In record or indicator mode, the following INSERT statement successfully performs the character to TIME implicit conversion because the format of the string is in the ANSI TIME format:

INSERT timetab ('11:23:34');