IBM Informix Spatial DataBlade select statement error
I am using IBM Informix Spatial DataBlade module for some geo-specific data.
I am trying to find points
in table xmlData
lying in a specified region.
But I am getting this error for select
statement.
SELECT sa.pre, sa.post
FROM xmlData sa
WHERE ST_Contains(('polygon((2 2,6 2,6 6,2 6,2 2)),sa.point)
Query:
select count(*) as mycnt fromText('polygon((2 2,6 2,6 6,2 6,2 2))',6),sa.point)
Error: -201
[Informix][Informix ODBC Driver][Informix]A syntax error has occurred.
(SQLPrepare[-201] at /work/lwchan/workspace/OATPHPcompile/pdo_informix/
pd开发者_JAVA技巧o_informix/informix_driver.c:131)
The statement:
select count(*) as mycnt fromText('polygon((2 2,6 2,6 6,2 6,2 2))',6),sa.point)
is ill-formed; it has no 'FROM' clause. Presumably, there is a space missing between 'FROM' and 'TEXT' in 'fromText'.
Be aware that TEXT is a data type in Informix. I don't think it will cause problems here using it as a table name, but be cautious.
精彩评论