16.20 - Casts - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ Geospatial Data Types

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1181-162K
Language
English (United States)

Teradata Database implements cast functionality that allows data type conversions between VARCHAR and MBB types. To convert a VARCHAR type to an MBB type, the VARCHAR must use the following format:

   (xmin, ymin, zmin, xmax, ymax, zmax)

where white space can appear anywhere.

Consider the following table definitions.

   CREATE TABLE sample_MBBs (skey INTEGER, shape_mbb MBB);
   CREATE TABLE sample_data (mbb_data VARCHAR(340));

This example performs MBR to VARCHAR data type conversion:

   INSERT INTO sample_data
   SELECT CAST(shape_mbb as VARCHAR(340))
   FROM sample_MBBs;