SAP Knowledge Base Article - Preview

3493115 - SQL Statement Error: "Expected a coordinate, but found ')' instead at position 7 of WKT POINT( ) at 'st_point' function"

Symptom

When running the SQL statement in HANA:

call "_SYS_BIC"."sap_boc_spatial.procedures::PR_BOC_SPATIAL_FILL_CUSTOMER_DUNS"

the execution terminates with the following error:

SAP DBTech JDBC: [669]: spatial error: "_SYS_BIC"."sap_boc_spatial.procedures::PR_BOC_SPATIAL_FILL_CUSTOMER_DUNS": line 13 col 1 (at pos 468): exception 1600301: Expected a coordinate, but found ')' instead at position 7 of WKT POINT( ) at "st_point" function.

 

The procedure PR_BOC_SPATIAL_FILL_CUSTOMER_DUNS is defined as follows:

PROCEDURE "_SYS_BIC"."sap_boc_spatial.procedures::PR_BOC_SPATIAL_FILL_CUSTOMER_DUNS" ( ) 
      LANGUAGE SQLSCRIPT
      SQL SECURITY DEFINER
      --DEFAULT SCHEMA <default_schema_name>
      --READS SQL DATA 
      AS
BEGIN
-- D049320: Delete all entries with GeoDimension "Customer_DUNS"
DELETE FROM  "CORP_PUBLIC"."sap_boc_spatial::geospatial_core.T_CORE_GEOCODES" WHERE "GEODIMENSION" = 'CUSTOMER_DUNS';

-- D049320: Copy all entries with DUNS number into table "T_CORE_GEOCODES"

INSERT INTO "CORP_PUBLIC"."sap_boc_spatial::geospatial_core.T_CORE_GEOCODES"
select
"GEODIMENSION",
"ID1",
"ID2",
NULL,
NULL,
"MEDIUMTEXT",
"LATITUDE",
"LONGITUDE",
NEW ST_POINT('POINT('||"LONGITUDE"||' '||"LATITUDE"||')', 4326).ST_Transform(3857) AS "GEOPOINT"
from "_SYS_BIC"."sap_boc_spatial/CL_SAP_BOC_SPATIAL_BP_DUNS" where "ID2" IS NOT NULL;

END;


Read more...

Product

SAP HANA, platform edition 2.0

Keywords

SQL, HANA Studio, ST_POINT, spatial error, WKT POINT, coordinate, NULL, HANA procedure, geospatial, CUSTOMER_DUNS , KBA , HAN-DB-ENG-SPA , SAP HANA Spatial Engine , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.