on 2016 Jun 16 4:42 PM
I'm getting an error reading spatial data using a stored procedure.
First create some data:
CREATE OR REPLACE TABLE "DBA"."TEST" (
"ID" INTEGER,
"FEATURE_GEOMETRY" ST_Geometry(SRID=3857) NULL,
PRIMARY KEY ( "ID" ASC )
) IN "system";
INSERT INTO "DBA"."TEST" ("ID","FEATURE_GEOMETRY") VALUES(1,'Point (-79.3832 43.6682)');
Then try to retrieve it via a stored procedure:
CREATE OR REPLACE PROCEDURE TEST()
BEGIN
SELECT * FROM TEST;
END;
SELECT * FROM TEST();
This produces the error: Transform from SRID 3857 to 2147483647 not supported.
However, it works if I add the following RESULT clause to the procedure:
CREATE OR REPLACE PROCEDURE TEST()
RESULT (ID INTEGER, FEATURE_GEOMETRY TEST.FEATURE_GEOMETRY%TYPE )
BEGIN
SELECT * FROM TEST;
END;
SELECT * FROM TEST();
I would have expected the implied RESULT would use the data types from the base table.
I'm running SQL Anywhere is 17.0.0.1358.
Request clarification before answering.
User | Count |
---|---|
82 | |
29 | |
9 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.