Regular query results in syntax error with specific attribute

最后都变了- 提交于 2020-01-06 08:06:01

问题


I run a postgres database with postgis extention. With imposm3 openstreetmap data is loaded into the scheme import. The tables are called osm_point, osm_linestring and osm_polygon. Imposm is storing NULL as empty fields.

To query a specific attribute of the table, I usually write

select * from import.osm_point where highway <> ''

But only with the attribute natural this query is not working.

As seen in this picture, the attribute natural contains some filled lines and some empty lines.

When running a query to select only natural without empt field, the following is happen.

ERROR:  syntax error at or near "<>"
LINE 1: select * from import.osm_point where natural <> ''
                                                     ^
SQL state: 42601
Character: 46```

来源:https://stackoverflow.com/questions/57679704/regular-query-results-in-syntax-error-with-specific-attribute

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!