Teradata 查询
select F.farm_id, F.name, CASE WHEN geography.ST_GeometryType() = 'ST_POINT' THEN geography.ST_X() ELSE geography.ST_Centroid().ST_X() END as LNG, CASE WHEN geography.ST_GeometryType() = 'ST_POINT' THEN geography.ST_Y() ELSE geography.ST_Centroid().ST_Y() END as LAT from V_farm F, V_farm_workforce FW where F.farm_id=FW.farm_id and FW.account_id='bf064695-b9e3-46a2-a665-0bb794073ae3' and geography is not null
在 Teradata 中运行上述查询时,响应低于
FarmId Name LNG LAT
-----------------------------------------------------------------------------------------------------------
ea66e27f-eba4-4750-bd85-2a1e96941b10 Farm099 -88.9495943 33.5847365
2be7e35e-74a7-49eb-9e9d-5b65dbbf7c5e VFarmJuly23 -106.6409198 31.8018379
56982275-bcad-40f7-83db-5dbfd9f9c82c Farm112 -88.95096260000003 33.601958
如果我在 H2 中运行得到以下错误,则相同的查询
Function "ST_GEOMETRYTYPE" not found; SQL statement:
您能否建议如何在 H2 数据库中执行操作。