MBR Casts | Geospatial Data Types | Teradata Vantage - 17.05 - Casts - Teradata Database

Teradata Vantage™ - Geospatial Data Types

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
17.05
created_date
June 2020
category
Programming Reference
featnum
B035-1181-170K

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

(xmin, ymin, xmax, ymax)

where white space can appear anywhere.

Consider the following table definitions.

CREATE TABLE sample_MBRs (skey INTEGER, shape_mbr MBR);
CREATE TABLE sample_data (mbr_data VARCHAR(256));

This example performs MBR to VARCHAR data type conversion:

INSERT INTO sample_data
SELECT CAST(shape_mbr as VARCHAR(256))
FROM sample_MBRs;