17.00 - 17.05 - 例: ST_SphericalDistance - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - 地理空間データ型

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
17.05
Release Date
2020年6月
Content Type
プログラミング リファレンス
Publication ID
B035-1181-170K-JPN
Language
日本語 (日本)
   CREATE TABLE sample_points1 (skey1 INTEGER, point1 ST_Geometry);
   CREATE TABLE sample_points2 (skey2 INTEGER, point2 ST_Geometry);

   INSERT INTO sample_points1 VALUES (101, 'POINT(10 20)');
   INSERT INTO sample_points1 VALUES (102, 'POINT(10 50)');

   INSERT INTO sample_points2 VALUES (1001, 'POINT(20 30)');
   INSERT INTO sample_points2 VALUES (1002, 'POINT(20 40)');

   SELECT skey1, skey2, point1.ST_SphericalDistance(point2)
   FROM sample_points1, sample_points2
   ORDER BY skey1;