IBM Informix Spatial DataBlade select 语句错误

发布于 2024-08-26 10:09:13 字数 579 浏览 5 评论 0原文

我正在使用 IBM Informix Spatial DataBlade 模块来处理一些特定于地理的数据。 我试图在位于指定区域的表xmlData 中查找。 但我在 select 语句中收到此错误。

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/
     pdo_informix/informix_driver.c:131) 

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/
     pdo_informix/informix_driver.c:131) 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

捎一片雪花 2024-09-02 10:09:13

声明:

select count(*) as mycnt fromText('polygon((2 2,6 2,6 6,2 6,2 2))',6),sa.point)

格式不正确;它没有“FROM”子句。据推测,“fromText”中的“FROM”和“TEXT”之间缺少空格。

请注意,TEXT 是 Informix 中的一种数据类型。我认为使用它作为表名不会引起问题,但要小心。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文