INSERT SELECT and PTI Tables Examples | Teradata Vantage - Examples: INSERT SELECT and PTI Tables - Analytics Database - Teradata Vantage

Time Series Tables and Operations

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-10-30
dita:mapPath
tuc1628112453431.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
sfz1493079039055
lifecycle
latest
Product Category
Teradata Vantageā„¢

Table and Data Definition for INSERT SELECT Examples

Below are the PTI table definitions for the INSERT SELECT examples.

CREATE TABLE ocean_buoy(buoyid INT,temperature INT)
PRIMARY TIME INDEX(TIMESTAMP(6), DATE '2012-01-01', HOURS(1), COLUMNS(buoyid));
CREATE TABLE ocean_buoy_1(buoyid INT,temperature INT)
PRIMARY TIME INDEX(TIMESTAMP(6), DATE '2012-01-01', HOURS(1), COLUMNS(buoyid));
CREATE TABLE ocean_buoy_2(buoyid INT,temperature INT)
PRIMARY TIME INDEX(TIMESTAMP(6), DATE '2012-01-01', COLUMNS(buoyid));

Following are the non-PTI table definitions for the INSERT SELECT examples.

CREATE TABLE normal_table (timecode TIMESTAMP(2), buoyid INT, temperature INT);
CREATE TABLE normal_table2 (my_timebucket BIGINT NOT NULL, my_timecode TIMESTAMP(2), buoyid INT, temperature INT);